Skip to content

Commit a459ff2

Browse files
committed
Fix Wrap / Unwrap (#6026)
* bump swaps sdk * feeTokenAsset is optional
1 parent 8fa5c70 commit a459ff2

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"@notifee/react-native": "7.8.2",
102102
"@rainbow-me/provider": "0.0.12",
103103
"@rainbow-me/react-native-animated-number": "0.0.2",
104-
"@rainbow-me/swaps": "0.23.0",
104+
"@rainbow-me/swaps": "0.24.0",
105105
"@react-native-async-storage/async-storage": "1.23.1",
106106
"@react-native-camera-roll/camera-roll": "7.7.0",
107107
"@react-native-clipboard/clipboard": "1.13.2",

src/__swaps__/screens/Swap/components/ReviewPanel.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ const RainbowFee = () => {
9191
}).amount;
9292

9393
const { display: feeDisplay } = convertRawAmountToBalance(quote.fee.toString(), {
94-
decimals: quote.feeTokenAsset.decimals,
95-
symbol: quote.feeTokenAsset.symbol,
94+
decimals: quote?.feeTokenAsset?.decimals || 18,
95+
symbol: quote?.feeTokenAsset?.symbol || 'ETH',
9696
});
9797

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

103103
useAnimatedReaction(

yarn.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -4299,9 +4299,9 @@ __metadata:
42994299
languageName: node
43004300
linkType: hard
43014301

4302-
"@rainbow-me/swaps@npm:0.23.0":
4303-
version: 0.23.0
4304-
resolution: "@rainbow-me/swaps@npm:0.23.0"
4302+
"@rainbow-me/swaps@npm:0.24.0":
4303+
version: 0.24.0
4304+
resolution: "@rainbow-me/swaps@npm:0.24.0"
43054305
dependencies:
43064306
"@ethereumjs/util": "npm:9.0.0"
43074307
"@ethersproject/abi": "npm:5.7.0"
@@ -4316,7 +4316,7 @@ __metadata:
43164316
"@ethersproject/transactions": "npm:5.7.0"
43174317
"@ethersproject/wallet": "npm:5.7.0"
43184318
"@metamask/eth-sig-util": "npm:7.0.0"
4319-
checksum: 10c0/3029ca9ed16a45af1961d2fdc79c545ae20a55212b38c8d3daba707617f8630f5328bc52e0e4732d97bffdbda62408093b3c871ef696322f1853d71231561a0f
4319+
checksum: 10c0/c04cdd4f8dca5c2d6f8e371dca88e6359387dea9c9241a98fcacb334cd2016ba985ae70e412bc8983f7074c17a61f80edef1d367222defceb2666c750386f8b9
43204320
languageName: node
43214321
linkType: hard
43224322

@@ -7811,7 +7811,7 @@ __metadata:
78117811
"@notifee/react-native": "npm:7.8.2"
78127812
"@rainbow-me/provider": "npm:0.0.12"
78137813
"@rainbow-me/react-native-animated-number": "npm:0.0.2"
7814-
"@rainbow-me/swaps": "npm:0.23.0"
7814+
"@rainbow-me/swaps": "npm:0.24.0"
78157815
"@react-native-async-storage/async-storage": "npm:1.23.1"
78167816
"@react-native-camera-roll/camera-roll": "npm:7.7.0"
78177817
"@react-native-clipboard/clipboard": "npm:1.13.2"

0 commit comments

Comments
 (0)