From e61ba9d2393e292c6367a3bee3bff1d649f8b605 Mon Sep 17 00:00:00 2001 From: Chris Hibbert Date: Tue, 17 Aug 2021 13:34:16 -0700 Subject: [PATCH] chore: correct order of params to AmountMath.coerce() --- packages/zoe/src/contractSupport/ratio.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/zoe/src/contractSupport/ratio.js b/packages/zoe/src/contractSupport/ratio.js index 5b1441d0712..4ba04ce055b 100644 --- a/packages/zoe/src/contractSupport/ratio.js +++ b/packages/zoe/src/contractSupport/ratio.js @@ -73,8 +73,8 @@ export const makeRatio = ( /** @type {MakeRatioFromAmounts} */ export const makeRatioFromAmounts = (numeratorAmount, denominatorAmount) => { - AmountMath.coerce(numeratorAmount, numeratorAmount.brand); - AmountMath.coerce(denominatorAmount, denominatorAmount.brand); + AmountMath.coerce(numeratorAmount.brand, numeratorAmount); + AmountMath.coerce(denominatorAmount.brand, denominatorAmount); return makeRatio( // @ts-ignore coerce ensures values are Nats Nat(numeratorAmount.value), @@ -86,7 +86,7 @@ export const makeRatioFromAmounts = (numeratorAmount, denominatorAmount) => { }; const multiplyHelper = (amount, ratio, divideOp) => { - AmountMath.coerce(amount, amount.brand); + AmountMath.coerce(amount.brand, amount); assertIsRatio(ratio); assert( amount.brand === ratio.denominator.brand, @@ -123,7 +123,7 @@ export const multiplyBy = (amount, ratio) => { }; const divideHelper = (amount, ratio, divideOp) => { - AmountMath.coerce(amount, amount.brand); + AmountMath.coerce(amount.brand, amount); assertIsRatio(ratio); assert( amount.brand === ratio.numerator.brand,