Skip to content

Commit

Permalink
Fix Wrap / Unwrap (#6026)
Browse files Browse the repository at this point in the history
* bump swaps sdk

* feeTokenAsset is optional
  • Loading branch information
brunobar79 committed Aug 21, 2024
1 parent 8fa5c70 commit a459ff2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"@notifee/react-native": "7.8.2",
"@rainbow-me/provider": "0.0.12",
"@rainbow-me/react-native-animated-number": "0.0.2",
"@rainbow-me/swaps": "0.23.0",
"@rainbow-me/swaps": "0.24.0",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-camera-roll/camera-roll": "7.7.0",
"@react-native-clipboard/clipboard": "1.13.2",
Expand Down
6 changes: 3 additions & 3 deletions src/__swaps__/screens/Swap/components/ReviewPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ const RainbowFee = () => {
}).amount;

const { display: feeDisplay } = convertRawAmountToBalance(quote.fee.toString(), {
decimals: quote.feeTokenAsset.decimals,
symbol: quote.feeTokenAsset.symbol,
decimals: quote?.feeTokenAsset?.decimals || 18,
symbol: quote?.feeTokenAsset?.symbol || 'ETH',
});

rainbowFee.value = [feeDisplay, `${handleSignificantDecimals(multiply(feePercentage, 100), 2)}%`];
},
[nativeAsset?.value?.decimals, nativeAsset?.value?.price?.value, nativeCurrency, rainbowFee]
[rainbowFee]
);

useAnimatedReaction(
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4299,9 +4299,9 @@ __metadata:
languageName: node
linkType: hard

"@rainbow-me/swaps@npm:0.23.0":
version: 0.23.0
resolution: "@rainbow-me/swaps@npm:0.23.0"
"@rainbow-me/swaps@npm:0.24.0":
version: 0.24.0
resolution: "@rainbow-me/swaps@npm:0.24.0"
dependencies:
"@ethereumjs/util": "npm:9.0.0"
"@ethersproject/abi": "npm:5.7.0"
Expand All @@ -4316,7 +4316,7 @@ __metadata:
"@ethersproject/transactions": "npm:5.7.0"
"@ethersproject/wallet": "npm:5.7.0"
"@metamask/eth-sig-util": "npm:7.0.0"
checksum: 10c0/3029ca9ed16a45af1961d2fdc79c545ae20a55212b38c8d3daba707617f8630f5328bc52e0e4732d97bffdbda62408093b3c871ef696322f1853d71231561a0f
checksum: 10c0/c04cdd4f8dca5c2d6f8e371dca88e6359387dea9c9241a98fcacb334cd2016ba985ae70e412bc8983f7074c17a61f80edef1d367222defceb2666c750386f8b9
languageName: node
linkType: hard

Expand Down Expand Up @@ -7811,7 +7811,7 @@ __metadata:
"@notifee/react-native": "npm:7.8.2"
"@rainbow-me/provider": "npm:0.0.12"
"@rainbow-me/react-native-animated-number": "npm:0.0.2"
"@rainbow-me/swaps": "npm:0.23.0"
"@rainbow-me/swaps": "npm:0.24.0"
"@react-native-async-storage/async-storage": "npm:1.23.1"
"@react-native-camera-roll/camera-roll": "npm:7.7.0"
"@react-native-clipboard/clipboard": "npm:1.13.2"
Expand Down

0 comments on commit a459ff2

Please sign in to comment.