Skip to content

Commit

Permalink
feat: turn on rabby fee (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmy147 authored Jul 3, 2024
1 parent 77b70ba commit 002bb9e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@rabby-wallet/persist-store": "workspace:^",
"@rabby-wallet/rabby-api": "0.7.21",
"@rabby-wallet/rabby-security-engine": "2.0.3",
"@rabby-wallet/rabby-swap": "0.0.36",
"@rabby-wallet/rabby-swap": "0.0.37",
"@rabby-wallet/service-address": "workspace:^",
"@rabby-wallet/service-keyring": "workspace:^",
"@react-native-async-storage/async-storage": "^1.21.0",
Expand Down
5 changes: 3 additions & 2 deletions apps/mobile/src/core/services/swap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class SwapService {
viewList: {} as SwapServiceStore['viewList'],
tradeList: {} as SwapServiceStore['tradeList'],
preferMEVGuarded: false,
sortIncludeGasFee: true,
},
},
{
Expand Down Expand Up @@ -196,7 +197,7 @@ export class SwapService {
};

getSwapSortIncludeGasFee = () => {
return this.store.sortIncludeGasFee || false;
return this.store.sortIncludeGasFee ?? true;
};

setSwapSortIncludeGasFee = (bool: boolean) => {
Expand Down Expand Up @@ -236,7 +237,7 @@ export class SwapService {
};

getSwapPreferMEVGuarded = () => {
return this.store.preferMEVGuarded || false;
return this.store.preferMEVGuarded ?? false;
};

setSwapPreferMEVGuarded = (bool: boolean) => {
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/screens/Swap/hooks/quote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ export const useQuoteMethods = () => {
: Number(feeAfterDiscount) || 0,
chain,
gasPrice,
fee: true,
},
walletOpenapi,
),
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/screens/Swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ const Swap = () => {
<Text style={styles.afterLabel}>
{t('page.swap.rabby-fee')}
</Text>
<Text style={styles.afterValue}>0%</Text>
<Text style={styles.afterValue}>0.25%</Text>
</View>
</View>
)}
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6176,9 +6176,9 @@ __metadata:
languageName: node
linkType: hard

"@rabby-wallet/rabby-swap@npm:0.0.36":
version: 0.0.36
resolution: "@rabby-wallet/rabby-swap@npm:0.0.36"
"@rabby-wallet/rabby-swap@npm:0.0.37":
version: 0.0.37
resolution: "@rabby-wallet/rabby-swap@npm:0.0.37"
dependencies:
"@ethersproject/abi": ^5.7.0
axios: ^0.27.2
Expand All @@ -6187,7 +6187,7 @@ __metadata:
peerDependencies:
"@debank/common": ">=0.3.21"
"@rabby-wallet/rabby-api": ">=0.6.13"
checksum: dba8e040aa1d3825441b539d56340967775fc07ccd32478d209e26a1f851220272b4deea989e19ff44ab1389ffecaf6455a2f712816701a781aead5ec0ac261c
checksum: 1c5f3b419044284864131f2c1b41c7d2b63bd476705c0e5c74858d14789d56ace6bb0c168904ba1b78b7874f96c68fd047e6256547cde5a95a5393515c6ca313
languageName: node
linkType: hard

Expand Down Expand Up @@ -27587,7 +27587,7 @@ __metadata:
"@rabby-wallet/persist-store": "workspace:^"
"@rabby-wallet/rabby-api": 0.7.21
"@rabby-wallet/rabby-security-engine": 2.0.3
"@rabby-wallet/rabby-swap": 0.0.36
"@rabby-wallet/rabby-swap": 0.0.37
"@rabby-wallet/service-address": "workspace:^"
"@rabby-wallet/service-keyring": "workspace:^"
"@react-native-async-storage/async-storage": ^1.21.0
Expand Down

0 comments on commit 002bb9e

Please sign in to comment.