put gas estimation back

This commit is contained in:
Andrea Franz 2020-05-22 12:33:23 +02:00
parent 3299ff15f6
commit 602c2b84db
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D
2 changed files with 6 additions and 2 deletions

View File

@ -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) => {

View File

@ -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)}`;
}