@dahlia-labs/stableswap-sdk
Advanced tools
Comparing version 0.5.0 to 0.5.2
@@ -155,5 +155,8 @@ "use strict"; | ||
return { | ||
withdrawAmountsBeforeFees: withdrawAmounts.map(([amt, { beforeFees }]) => new token_utils_1.TokenAmount(amt.token, beforeFees)), | ||
withdrawAmounts: [withdrawAmounts[0][0], withdrawAmounts[1][0]], | ||
fees: withdrawAmounts.map(([amt, { fee }]) => new token_utils_1.TokenAmount(amt.token, fee)), | ||
withdrawAmountsBeforeFees: withdrawAmounts.map(([amt, { beforeFees }]) => (0, exports.denormalizeAmount)(new token_utils_1.TokenAmount(amt.token, beforeFees))), | ||
withdrawAmounts: [ | ||
(0, exports.denormalizeAmount)(withdrawAmounts[0][0]), | ||
(0, exports.denormalizeAmount)(withdrawAmounts[1][0]), | ||
], | ||
fees: withdrawAmounts.map(([amt, { fee }]) => (0, exports.denormalizeAmount)(new token_utils_1.TokenAmount(amt.token, fee))), | ||
}; | ||
@@ -160,0 +163,0 @@ }; |
@@ -145,5 +145,8 @@ import { Fraction, ONE, TEN, TokenAmount, ZERO, } from "@dahlia-labs/token-utils"; | ||
return { | ||
withdrawAmountsBeforeFees: withdrawAmounts.map(([amt, { beforeFees }]) => new TokenAmount(amt.token, beforeFees)), | ||
withdrawAmounts: [withdrawAmounts[0][0], withdrawAmounts[1][0]], | ||
fees: withdrawAmounts.map(([amt, { fee }]) => new TokenAmount(amt.token, fee)), | ||
withdrawAmountsBeforeFees: withdrawAmounts.map(([amt, { beforeFees }]) => denormalizeAmount(new TokenAmount(amt.token, beforeFees))), | ||
withdrawAmounts: [ | ||
denormalizeAmount(withdrawAmounts[0][0]), | ||
denormalizeAmount(withdrawAmounts[1][0]), | ||
], | ||
fees: withdrawAmounts.map(([amt, { fee }]) => denormalizeAmount(new TokenAmount(amt.token, fee))), | ||
}; | ||
@@ -150,0 +153,0 @@ }; |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "0.5.0", | ||
"version": "0.5.2", | ||
"repository": { | ||
@@ -31,4 +31,4 @@ "type": "git", | ||
"@types/lodash.mapvalues": "^4.6.7", | ||
"@types/node": "^17.0.31", | ||
"bn.js": "^5.2.0", | ||
"@types/node": "^17.0.38", | ||
"bn.js": "^5.2.1", | ||
"jsbi": "^4.3.0" | ||
@@ -41,4 +41,4 @@ }, | ||
"dependencies": { | ||
"@dahlia-labs/token-utils": "^0.5.0", | ||
"@saberhq/tsconfig": "^1.13.0", | ||
"@dahlia-labs/token-utils": "^0.5.2", | ||
"@saberhq/tsconfig": "^1.13.24", | ||
"lodash.mapvalues": "^4.6.0", | ||
@@ -59,3 +59,3 @@ "tslib": "^2.4.0" | ||
"homepage": "https://github.com/DahliaLabs/dahlia-common#readme", | ||
"gitHead": "ba05ccf17a63697431df87225c3376b40340fc6e" | ||
"gitHead": "04302fe3dde02511e25e9b13088e88c3dcb7327a" | ||
} |
@@ -311,8 +311,11 @@ import type { Token } from "@dahlia-labs/token-utils"; | ||
return { | ||
withdrawAmountsBeforeFees: withdrawAmounts.map( | ||
([amt, { beforeFees }]) => new TokenAmount(amt.token, beforeFees) | ||
withdrawAmountsBeforeFees: withdrawAmounts.map(([amt, { beforeFees }]) => | ||
denormalizeAmount(new TokenAmount(amt.token, beforeFees)) | ||
) as [TokenAmount, TokenAmount], | ||
withdrawAmounts: [withdrawAmounts[0][0], withdrawAmounts[1][0]], | ||
fees: withdrawAmounts.map( | ||
([amt, { fee }]) => new TokenAmount(amt.token, fee) | ||
withdrawAmounts: [ | ||
denormalizeAmount(withdrawAmounts[0][0]), | ||
denormalizeAmount(withdrawAmounts[1][0]), | ||
], | ||
fees: withdrawAmounts.map(([amt, { fee }]) => | ||
denormalizeAmount(new TokenAmount(amt.token, fee)) | ||
) as [TokenAmount, TokenAmount], | ||
@@ -319,0 +322,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
149060
1575