fix: always consider user input when performing swap (#572)
* fix: always consider user input when performing swap * refactor: extract decimal places constants * refactor: extract minimumOptimalValue * fix: handle bzz precision and tweak message
This commit is contained in:
@@ -87,4 +87,11 @@ export class Token {
|
||||
this.decimals,
|
||||
)
|
||||
}
|
||||
|
||||
plusBaseUnits(amount: string): Token {
|
||||
return new Token(
|
||||
this.toBigNumber.plus(new BigNumber(amount).multipliedBy(new BigNumber(10).pow(this.decimals))),
|
||||
this.decimals,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user