put gas estimation back
This commit is contained in:
parent
3299ff15f6
commit
602c2b84db
|
@ -130,10 +130,10 @@ export const redeem = (bucketAddress: string, recipientAddress: string, cleanCod
|
||||||
}
|
}
|
||||||
|
|
||||||
const redeem = bucket.methods.redeem(message, sig);
|
const redeem = bucket.methods.redeem(message, sig);
|
||||||
// const gas = await redeem.estimateGas();
|
const gas = await redeem.estimateGas();
|
||||||
redeem.send({
|
redeem.send({
|
||||||
from: account,
|
from: account,
|
||||||
// gas
|
gas
|
||||||
}).then((resp: any) => {
|
}).then((resp: any) => {
|
||||||
dispatch(redeemDone(resp.transactionHash));
|
dispatch(redeemDone(resp.transactionHash));
|
||||||
}).catch((err: any) => {
|
}).catch((err: any) => {
|
||||||
|
|
|
@ -29,3 +29,7 @@ export const toBaseUnit = (fullAmount: string, decimalsSize: number, roundDecima
|
||||||
export const isTokenERC20 = (token: Token): token is TokenERC20 => {
|
export const isTokenERC20 = (token: Token): token is TokenERC20 => {
|
||||||
return (token as TokenERC20).decimals !== undefined;
|
return (token as TokenERC20).decimals !== undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const compressAddress = (a: string, padding: number = 4) => {
|
||||||
|
return `${a.slice(0, padding + 2)}...${a.slice(a.length - padding)}`;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue