diff --git a/src/actions/redeem.ts b/src/actions/redeem.ts index 8f94a81..dfd0cd4 100644 --- a/src/actions/redeem.ts +++ b/src/actions/redeem.ts @@ -130,10 +130,10 @@ export const redeem = (bucketAddress: string, recipientAddress: string, cleanCod } const redeem = bucket.methods.redeem(message, sig); - // const gas = await redeem.estimateGas(); + const gas = await redeem.estimateGas(); redeem.send({ from: account, - // gas + gas }).then((resp: any) => { dispatch(redeemDone(resp.transactionHash)); }).catch((err: any) => { diff --git a/src/utils.ts b/src/utils.ts index 7fe0435..e7af7eb 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -29,3 +29,7 @@ export const toBaseUnit = (fullAmount: string, decimalsSize: number, roundDecima export const isTokenERC20 = (token: Token): token is TokenERC20 => { 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)}`; +}