Skip to content

Commit

Permalink
Fix EIP20CoGateway not using instance address correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
hobofan committed Feb 11, 2019
1 parent f1e47b1 commit b1f4228
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ContractInteract/EIP20CoGateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,11 +667,7 @@ class EIP20CoGateway {
return Promise.reject(err);
}
return this.getEIP20UtilityToken().then((eip20ValueToken) => {
return eip20ValueToken.isAmountApproved(
redeemer,
this.coGatewayAddress,
amount,
);
return eip20ValueToken.isAmountApproved(redeemer, this.address, amount);
});
}

Expand All @@ -697,7 +693,7 @@ class EIP20CoGateway {
return Promise.reject(err);
}
return this.getEIP20UtilityToken().then((eip20Token) => {
return eip20Token.approve(this.coGatewayAddress, amount, txOptions);
return eip20Token.approve(this.address, amount, txOptions);
});
}

Expand Down

0 comments on commit b1f4228

Please sign in to comment.