Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
weth peth currency unit default update (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler17 authored Apr 22, 2019
1 parent e59f57b commit e15c3d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/eth/tokens/PethToken.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Erc20Token from './Erc20Token';
import { WETH } from '../Currency';
import { WETH, PETH } from '../Currency';

export default class PethToken extends Erc20Token {
constructor(contract, web3Service, tub) {
Expand All @@ -12,7 +12,7 @@ export default class PethToken extends Erc20Token {
return this._tub.join(value, { promise });
}

exit(amount, { unit = WETH, promise } = {}) {
exit(amount, { unit = PETH, promise } = {}) {
const value = this._valueForContract(amount, unit);
return this._tub.exit(value, { promise });
}
Expand Down
4 changes: 2 additions & 2 deletions src/eth/tokens/WethToken.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Erc20Token from './Erc20Token';
import { ETH } from '../Currency';
import { ETH, WETH } from '../Currency';

export default class WethToken extends Erc20Token {
constructor(contract, web3Service, decimals) {
Expand All @@ -17,7 +17,7 @@ export default class WethToken extends Erc20Token {
});
}

withdraw(amount, { unit = ETH, ...options } = {}) {
withdraw(amount, { unit = WETH, ...options } = {}) {
const value = this._valueForContract(amount, unit);
return this._contract.withdraw(value, options);
}
Expand Down

0 comments on commit e15c3d3

Please sign in to comment.