Skip to content

Commit

Permalink
Add Sum 2^255 to srcAmount API
Browse files Browse the repository at this point in the history
  • Loading branch information
trungnx committed Dec 24, 2019
1 parent 7ffc250 commit d100517
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/js/sagas/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ export function* getExpectedRateAndZeroRate(isProceeding, ethereum, tokens, srcT
let zeroSrcAmount = yield call(getSourceAmountZero, srcTokenSymbol, defaultRate);
let rate, rateZero;
let rateFunctionName = 'getRateAtLatestBlock';

if (!isProceeding) {
rateFunctionName = 'getExpectedRate';
refinedSrcAmount = hexToNumber(refinedSrcAmount);
zeroSrcAmount = hexToNumber(zeroSrcAmount);

const mask = converters.maskNumber();
refinedSrcAmount = converters.sumOfTwoNumber(refinedSrcAmount, mask);
zeroSrcAmount = converters.sumOfTwoNumber(zeroSrcAmount, mask);
}

try {
Expand Down

0 comments on commit d100517

Please sign in to comment.