@rango-dev/widget-embedded 0.1.10-next.80 → 0.1.10-next.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/components/AppRouter.d.ts.map +1 -1
  2. package/dist/components/AppRoutes.d.ts.map +1 -1
  3. package/dist/components/ChangeSlippageButton.d.ts +2 -0
  4. package/dist/components/ChangeSlippageButton.d.ts.map +1 -0
  5. package/dist/components/ConfirmSwapErrors.d.ts +3 -0
  6. package/dist/components/ConfirmSwapErrors.d.ts.map +1 -0
  7. package/dist/components/ConfirmSwapWarnings.d.ts +3 -0
  8. package/dist/components/ConfirmSwapWarnings.d.ts.map +1 -0
  9. package/dist/components/Layout.d.ts.map +1 -1
  10. package/dist/components/UpdateUrl.d.ts.map +1 -1
  11. package/dist/components/warnings/BalanceWarnings.d.ts +6 -0
  12. package/dist/components/warnings/BalanceWarnings.d.ts.map +1 -0
  13. package/dist/components/warnings/ConfirmSwapExtraMessages.d.ts +6 -0
  14. package/dist/components/warnings/ConfirmSwapExtraMessages.d.ts.map +1 -0
  15. package/dist/components/warnings/HighSlippageWarning.d.ts +6 -0
  16. package/dist/components/warnings/HighSlippageWarning.d.ts.map +1 -0
  17. package/dist/components/warnings/MinRequiredSlippage.d.ts +6 -0
  18. package/dist/components/warnings/MinRequiredSlippage.d.ts.map +1 -0
  19. package/dist/constants/swapSettings.d.ts +6 -0
  20. package/dist/constants/swapSettings.d.ts.map +1 -0
  21. package/dist/hooks/useNavigateBack.d.ts +4 -0
  22. package/dist/hooks/useNavigateBack.d.ts.map +1 -0
  23. package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
  24. package/dist/pages/ConfirmWalletsPage.d.ts +0 -5
  25. package/dist/pages/ConfirmWalletsPage.d.ts.map +1 -1
  26. package/dist/pages/HistoryPage.d.ts.map +1 -1
  27. package/dist/pages/Home.d.ts.map +1 -1
  28. package/dist/pages/LiquiditySourcesPage.d.ts.map +1 -1
  29. package/dist/pages/SelectChainPage.d.ts.map +1 -1
  30. package/dist/pages/SelectTokenPage.d.ts.map +1 -1
  31. package/dist/pages/SettingsPage.d.ts.map +1 -1
  32. package/dist/pages/SwapDetailsPage.d.ts.map +1 -1
  33. package/dist/pages/WalletsPage.d.ts.map +1 -1
  34. package/dist/store/bestRoute.d.ts +1 -0
  35. package/dist/store/bestRoute.d.ts.map +1 -1
  36. package/dist/store/confirmSwap.d.ts +35 -0
  37. package/dist/store/confirmSwap.d.ts.map +1 -0
  38. package/dist/store/settings.d.ts.map +1 -1
  39. package/dist/store/ui.d.ts +2 -0
  40. package/dist/store/ui.d.ts.map +1 -0
  41. package/dist/store/wallets.d.ts.map +1 -1
  42. package/dist/types/index.d.ts +2 -0
  43. package/dist/types/index.d.ts.map +1 -0
  44. package/dist/types/swap.d.ts +11 -0
  45. package/dist/types/swap.d.ts.map +1 -0
  46. package/dist/utils/common.d.ts +1 -0
  47. package/dist/utils/common.d.ts.map +1 -1
  48. package/dist/utils/numbers.d.ts +5 -0
  49. package/dist/utils/numbers.d.ts.map +1 -1
  50. package/dist/utils/routing.d.ts +5 -7
  51. package/dist/utils/routing.d.ts.map +1 -1
  52. package/dist/utils/swap.d.ts +31 -3
  53. package/dist/utils/swap.d.ts.map +1 -1
  54. package/dist/utils/wallets.d.ts +2 -3
  55. package/dist/utils/wallets.d.ts.map +1 -1
  56. package/dist/widget-embedded.cjs.development.js +1814 -1327
  57. package/dist/widget-embedded.cjs.development.js.map +1 -1
  58. package/dist/widget-embedded.cjs.production.min.js +1814 -1327
  59. package/dist/widget-embedded.cjs.production.min.js.map +1 -1
  60. package/dist/widget-embedded.esm.js +1818 -1331
  61. package/dist/widget-embedded.esm.js.map +1 -1
  62. package/package.json +1 -1
  63. package/src/components/AppRouter.tsx +38 -3
  64. package/src/components/AppRoutes.tsx +8 -2
  65. package/src/components/ChangeSlippageButton.tsx +23 -0
  66. package/src/components/ConfirmSwapErrors.tsx +38 -0
  67. package/src/components/ConfirmSwapWarnings.tsx +38 -0
  68. package/src/components/Layout.tsx +22 -6
  69. package/src/components/UpdateUrl.tsx +100 -18
  70. package/src/components/warnings/BalanceWarnings.tsx +16 -0
  71. package/src/components/warnings/ConfirmSwapExtraMessages.tsx +14 -0
  72. package/src/components/warnings/HighSlippageWarning.tsx +21 -0
  73. package/src/components/warnings/MinRequiredSlippage.tsx +18 -0
  74. package/src/constants/navigationRoutes.ts +2 -2
  75. package/src/constants/swapSettings.ts +9 -0
  76. package/src/hooks/useNavigateBack.ts +37 -0
  77. package/src/pages/ConfirmSwapPage.tsx +30 -8
  78. package/src/pages/ConfirmWalletsPage.tsx +30 -17
  79. package/src/pages/HistoryPage.tsx +4 -4
  80. package/src/pages/Home.tsx +79 -36
  81. package/src/pages/LiquiditySourcesPage.tsx +11 -8
  82. package/src/pages/SelectChainPage.tsx +9 -28
  83. package/src/pages/SelectTokenPage.tsx +38 -27
  84. package/src/pages/SettingsPage.tsx +26 -11
  85. package/src/pages/SwapDetailsPage.tsx +9 -3
  86. package/src/pages/WalletsPage.tsx +37 -22
  87. package/src/store/bestRoute.ts +147 -28
  88. package/src/store/confirmSwap.ts +327 -0
  89. package/src/store/settings.ts +44 -32
  90. package/src/store/ui.ts +15 -0
  91. package/src/store/wallets.ts +93 -80
  92. package/src/swapBox.tsx +5 -5
  93. package/src/types/index.ts +1 -0
  94. package/src/types/swap.ts +13 -0
  95. package/src/utils/common.ts +4 -0
  96. package/src/utils/numbers.ts +17 -0
  97. package/src/utils/routing.ts +28 -77
  98. package/src/utils/swap.ts +445 -67
  99. package/src/utils/wallets.ts +4 -19
  100. package/dist/hooks/useBestRoute.d.ts +0 -8
  101. package/dist/hooks/useBestRoute.d.ts.map +0 -1
  102. package/dist/hooks/useConfirmSwap.d.ts +0 -2
  103. package/dist/hooks/useConfirmSwap.d.ts.map +0 -1
  104. package/src/hooks/useBestRoute.ts +0 -70
  105. package/src/hooks/useConfirmSwap.ts +0 -268
@@ -1,6 +1,7 @@
1
+ import { SelectableWallet } from '@rango-dev/ui';
1
2
  import { WalletType } from '@rango-dev/wallets-shared';
2
3
  import { create } from 'zustand';
3
- import { SelectableWallet } from '../pages/ConfirmWalletsPage';
4
+ import { subscribeWithSelector } from 'zustand/middleware';
4
5
  import { httpService } from '../services/httpService';
5
6
  import {
6
7
  getRequiredChains,
@@ -52,92 +53,104 @@ interface WalletsStore {
52
53
  }
53
54
 
54
55
  export const useWalletsStore = createSelectors(
55
- create<WalletsStore>()((set) => ({
56
- accounts: [],
57
- balances: [],
58
- selectedWallets: [],
59
- connectWallet: (accounts) => {
60
- const tokens = useMetaStore.getState().meta.tokens;
56
+ create<WalletsStore>()(
57
+ subscribeWithSelector((set) => ({
58
+ accounts: [],
59
+ balances: [],
60
+ selectedWallets: [],
61
+ connectWallet: (accounts) => {
62
+ const tokens = useMetaStore.getState().meta.tokens;
61
63
 
62
- set((state) => ({
63
- accounts: state.accounts.concat(accounts),
64
- balances: state.balances.concat(
65
- accounts.map((account) => ({
66
- balances: [],
67
- address: account.address,
68
- chain: account.chain,
69
- loading: true,
70
- walletType: account.walletType,
71
- error: false,
72
- explorerUrl: null,
73
- })),
74
- ),
75
- }));
76
- accounts.forEach(async (account) => {
77
- try {
78
- const response = await httpService.getWalletsDetails([
79
- { address: account.address, blockchain: account.chain },
80
- ]);
81
- const retrivedBalance = response.wallets[0];
82
- if (retrivedBalance) {
64
+ set((state) => ({
65
+ accounts: state.accounts.concat(accounts),
66
+ balances: state.balances.concat(
67
+ accounts.map((account) => ({
68
+ balances: [],
69
+ address: account.address,
70
+ chain: account.chain,
71
+ loading: true,
72
+ walletType: account.walletType,
73
+ error: false,
74
+ explorerUrl: null,
75
+ }))
76
+ ),
77
+ }));
78
+ accounts.forEach(async (account) => {
79
+ try {
80
+ const response = await httpService.getWalletsDetails([
81
+ { address: account.address, blockchain: account.chain },
82
+ ]);
83
+ const retrivedBalance = response.wallets[0];
84
+ if (retrivedBalance) {
85
+ set((state) => ({
86
+ balances: state.balances.map((balance) => {
87
+ return isAccountAndBalanceMatched(account, balance)
88
+ ? makeBalanceFor(account, retrivedBalance, tokens)
89
+ : balance;
90
+ }),
91
+ }));
92
+ } else throw new Error('Wallet not found');
93
+ } catch (error) {
83
94
  set((state) => ({
84
95
  balances: state.balances.map((balance) => {
85
96
  return isAccountAndBalanceMatched(account, balance)
86
- ? makeBalanceFor(account, retrivedBalance, tokens)
97
+ ? resetBalanceState(balance)
87
98
  : balance;
88
99
  }),
89
100
  }));
90
- } else throw new Error('Wallet not found');
91
- } catch (error) {
92
- set((state) => ({
93
- balances: state.balances.map((balance) => {
94
- return isAccountAndBalanceMatched(account, balance)
95
- ? resetBalanceState(balance)
96
- : balance;
97
- }),
98
- }));
99
- }
100
- });
101
- },
102
- disconnectWallet: (walletType) => {
103
- set((state) => ({
104
- accounts: state.accounts.filter((account) => account.walletType !== walletType),
105
- balances: state.balances.filter((balance) => balance.walletType !== walletType),
106
- selectedWallets: state.selectedWallets.filter((wallet) => wallet.walletType != walletType),
107
- }));
108
- },
109
- initSelectedWallets: () =>
110
- set((state) => {
111
- const requiredChains = getRequiredChains(useBestRouteStore.getState().bestRoute);
112
- const connectedWallets = state.accounts;
113
- const selectedWallets: SelectedWallet[] = [];
114
- requiredChains.forEach((chain) => {
115
- const anyWalletSelected = !!state.selectedWallets.find(
116
- (wallet) => wallet.chain === chain,
117
- );
118
- if (!anyWalletSelected) {
119
- const firstWalletWithMatchedChain = connectedWallets.find(
120
- (wallet) => wallet.chain === chain,
121
- );
122
- if (!!firstWalletWithMatchedChain)
123
- selectedWallets.push({
124
- address: firstWalletWithMatchedChain.address,
125
- chain: firstWalletWithMatchedChain.chain,
126
- walletType: firstWalletWithMatchedChain.walletType,
127
- });
128
101
  }
129
102
  });
130
- return { selectedWallets: state.selectedWallets.concat(selectedWallets) };
131
- }),
132
- setSelectedWallet: (wallet) =>
133
- set((state) => ({
134
- selectedWallets: state.selectedWallets
135
- .filter((selectedWallet) => selectedWallet.chain !== wallet.chain)
136
- .concat({
137
- chain: wallet.chain,
138
- address: wallet.address,
139
- walletType: wallet.walletType,
140
- }),
141
- })),
142
- })),
103
+ },
104
+ disconnectWallet: (walletType) => {
105
+ set((state) => ({
106
+ accounts: state.accounts.filter(
107
+ (account) => account.walletType !== walletType
108
+ ),
109
+ balances: state.balances.filter(
110
+ (balance) => balance.walletType !== walletType
111
+ ),
112
+ selectedWallets: state.selectedWallets.filter(
113
+ (wallet) => wallet.walletType != walletType
114
+ ),
115
+ }));
116
+ },
117
+ initSelectedWallets: () =>
118
+ set((state) => {
119
+ const requiredChains = getRequiredChains(
120
+ useBestRouteStore.getState().bestRoute
121
+ );
122
+ const connectedWallets = state.accounts;
123
+ const selectedWallets: SelectedWallet[] = [];
124
+ requiredChains.forEach((chain) => {
125
+ const anyWalletSelected = !!state.selectedWallets.find(
126
+ (wallet) => wallet.chain === chain
127
+ );
128
+ if (!anyWalletSelected) {
129
+ const firstWalletWithMatchedChain = connectedWallets.find(
130
+ (wallet) => wallet.chain === chain
131
+ );
132
+ if (!!firstWalletWithMatchedChain)
133
+ selectedWallets.push({
134
+ address: firstWalletWithMatchedChain.address,
135
+ chain: firstWalletWithMatchedChain.chain,
136
+ walletType: firstWalletWithMatchedChain.walletType,
137
+ });
138
+ }
139
+ });
140
+ return {
141
+ selectedWallets: state.selectedWallets.concat(selectedWallets),
142
+ };
143
+ }),
144
+ setSelectedWallet: (wallet) =>
145
+ set((state) => ({
146
+ selectedWallets: state.selectedWallets
147
+ .filter((selectedWallet) => selectedWallet.chain !== wallet.chain)
148
+ .concat({
149
+ chain: wallet.chain,
150
+ address: wallet.address,
151
+ walletType: wallet.walletType,
152
+ }),
153
+ })),
154
+ }))
155
+ )
143
156
  );
package/src/swapBox.tsx CHANGED
@@ -1,11 +1,11 @@
1
- import { SwapContainer } from '@rangodev/ui';
1
+ import { SwapContainer } from '@rango-dev/ui';
2
2
  import React from 'react';
3
3
  import { AppRouter } from './components/AppRouter';
4
4
  import { useMetaStore } from './store/meta';
5
- import { Events, Provider } from '@rangodev/wallets-core';
6
- import { allProviders } from '@rangodev/provider-all';
7
- import { EventHandler } from '@rangodev/wallets-core/dist/wallet';
8
- import { isEvmBlockchain, Network } from '@rangodev/wallets-shared';
5
+ import { Events, Provider } from '@rango-dev/wallets-core';
6
+ import { allProviders } from '@rango-dev/provider-all';
7
+ import { EventHandler } from '@rango-dev/wallets-core/dist/wallet';
8
+ import { isEvmBlockchain, Network } from '@rango-dev/wallets-shared';
9
9
  import {
10
10
  prepareAccountsForWalletStore,
11
11
  walletAndSupportedChainsNames,
@@ -0,0 +1 @@
1
+ export * from './swap';
@@ -0,0 +1,13 @@
1
+ import { SwapSavedSettings } from '@rango-dev/ui/dist/types/swaps';
2
+
3
+ export type PendingSwapSettings = Omit<
4
+ SwapSavedSettings,
5
+ 'disabledSwappersIds'
6
+ >;
7
+
8
+ export type SwapButtonState = (
9
+ | { disabled: true }
10
+ | { disabled: false; hasWarning?: boolean }
11
+ ) & {
12
+ title: string;
13
+ };
@@ -1,3 +1,7 @@
1
1
  export function removeDuplicateFrom<T>(array: T[]): T[] {
2
2
  return Array.from(new Set(array));
3
3
  }
4
+
5
+ export function areEqual(array1: (number | string)[], array2: (number | string)[]) {
6
+ return array1.length === array2.length && array1.every((v, i) => v === array2[i]);
7
+ }
@@ -1,4 +1,5 @@
1
1
  import { BigNumber } from 'bignumber.js';
2
+ import { BestRouteResponse } from 'rango-sdk';
2
3
 
3
4
  export const percentToString = (p: number, fractions = 0): string => (p * 100).toFixed(fractions);
4
5
  export const secondsToString = (s: number): string => {
@@ -92,3 +93,19 @@ export function removeExtraDecimals(num: string, maxDecimals: number): string {
92
93
  return num;
93
94
  }
94
95
  }
96
+
97
+ export const totalArrivalTime = (data: BestRouteResponse | null) =>
98
+ data?.result?.swaps?.reduce((a, b) => a + b.estimatedTimeInSeconds, 0) || 0;
99
+
100
+ export const rawFees = (data: BestRouteResponse): string =>
101
+ (
102
+ data?.result?.swaps?.flatMap((s) => s.fee.map((f) => ({ swapperId: s.swapperId, fee: f }))) ||
103
+ []
104
+ )
105
+ .reduce((partialSum, a) => partialSum + parseFloat(a.fee.amount), 0)
106
+ .toFixed(3);
107
+
108
+ export const decimalNumber = (number = '0', toFixed: number) => parseFloat(number).toFixed(toFixed);
109
+
110
+ export const containsText = (text: string, searchText: string) =>
111
+ text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
@@ -4,8 +4,7 @@ import {
4
4
  } from '@rango-dev/ui/dist/types/swaps';
5
5
  import BigNumber from 'bignumber.js';
6
6
  import { BestRouteResponse } from 'rango-sdk';
7
- import { ZERO } from '../constants/numbers';
8
- import { numberToString } from './numbers';
7
+ import { areEqual } from './common';
9
8
  import { SelectedWallet } from './wallets';
10
9
 
11
10
  export const getBestRouteToTokenUsdPrice = (
@@ -13,82 +12,32 @@ export const getBestRouteToTokenUsdPrice = (
13
12
  ): number | null | undefined =>
14
13
  bestRoute?.result?.swaps[bestRoute?.result?.swaps.length - 1].to.usdPrice;
15
14
 
16
- export type RouteChangeStatus = {
17
- isChanged: boolean;
18
- warningMessage?: string;
19
- };
20
-
21
- export const compareRoutes = (
22
- route1: BestRouteResponse,
23
- route2: BestRouteResponse,
24
- inputAmount: string,
25
- fromTokenUsdPrice: number | null,
26
- toTokenUsdPrice: number | null,
27
- ): RouteChangeStatus => {
28
- let outUsdValue: BigNumber = (
29
- new BigNumber(route2.result?.outputAmount || '0') || ZERO
30
- ).multipliedBy(toTokenUsdPrice || 0);
31
- if (outUsdValue.isNaN()) outUsdValue = ZERO;
32
- let inUsdValue: BigNumber = new BigNumber(inputAmount || '0').multipliedBy(
33
- fromTokenUsdPrice || 0,
34
- );
35
- if (inUsdValue.isNaN()) inUsdValue = ZERO;
36
- const outToInRatio =
37
- inUsdValue === null || inUsdValue.lte(ZERO)
38
- ? 0
39
- : outUsdValue === null || outUsdValue.lte(ZERO)
40
- ? 0
41
- : outUsdValue.div(inUsdValue).minus(1).multipliedBy(100);
42
- const disableSwapButton =
43
- (parseInt(outToInRatio?.toFixed(2) || '0') <= -10 &&
44
- (inUsdValue === null || inUsdValue.gte(new BigNumber(400)))) ||
45
- (parseInt(outToInRatio?.toFixed(2) || '0') <= -5 &&
46
- (inUsdValue === null || inUsdValue.gte(new BigNumber(1000))));
47
-
48
- if (disableSwapButton) {
49
- return {
50
- isChanged: true,
51
- warningMessage: 'Route updated and price impact is too high, try again later!',
52
- };
53
- }
54
-
55
- const out1 = route1.result?.outputAmount || null;
56
- const out2 = route2.result?.outputAmount || null;
57
- if (!!out1 && !!out2) {
58
- const changePercent = new BigNumber(out2).div(new BigNumber(out1)).minus(1).multipliedBy(100);
59
- if (changePercent.toNumber() <= -1) {
60
- return {
61
- isChanged: true,
62
- warningMessage: `Output amount changed to ${numberToString(out2)}
63
- (${numberToString(changePercent, null, 2)}% change).`,
64
- };
65
- }
66
- }
15
+ export function isNumberOfSwapsChanged(route1: BestRouteResponse, route2: BestRouteResponse) {
67
16
  const route1Swaps = route1.result?.swaps || [];
68
17
  const route2Swaps = route2.result?.swaps || [];
69
- if (route1Swaps.length !== route2Swaps.length)
70
- return { isChanged: true, warningMessage: 'Route has been updated.' };
71
- else {
72
- for (let i = 0; i < route1Swaps.length; i++) {
73
- if (route1Swaps[i].swapperId !== route2Swaps[i].swapperId)
74
- return { isChanged: true, warningMessage: 'Route swappers has been updated.' };
75
- else if (route1Swaps[i].to.symbol !== route2Swaps[i].to.symbol)
76
- return {
77
- isChanged: true,
78
- warningMessage: 'Route internal coins has been updated.',
79
- };
80
- }
81
- }
82
- return { isChanged: false };
18
+ return route1Swaps.length !== route2Swaps.length;
19
+ }
20
+
21
+ export function isRouteSwappersUpdated(route1: BestRouteResponse, route2: BestRouteResponse) {
22
+ const route1Swappers = route1.result?.swaps.map((swap) => swap.swapperId) || [];
23
+ const route2Swappers = route2.result?.swaps.map((swap) => swap.swapperId) || [];
24
+ return !areEqual(route1Swappers, route2Swappers);
25
+ }
26
+
27
+ export function isRouteInternalCoinsUpdated(route1: BestRouteResponse, route2: BestRouteResponse) {
28
+ const route1InternalCoins = route1.result?.swaps.map((swap) => swap.to.symbol) || [];
29
+ const route2InternalCoins = route2.result?.swaps.map((swap) => swap.to.symbol) || [];
30
+ return !areEqual(route1InternalCoins, route2InternalCoins);
31
+ }
32
+
33
+ export const isRouteChanged = (route1: BestRouteResponse, route2: BestRouteResponse): boolean => {
34
+ return (
35
+ isNumberOfSwapsChanged(route1, route2) ||
36
+ isRouteSwappersUpdated(route1, route2) ||
37
+ isRouteInternalCoinsUpdated(route1, route2)
38
+ );
83
39
  };
84
40
 
85
- export const getOutToInRatio = (fromUsdValue: BigNumber | null, toUsdValue: BigNumber | null) =>
86
- fromUsdValue === null || fromUsdValue.lte(ZERO)
87
- ? 0
88
- : toUsdValue === null || toUsdValue.lte(ZERO)
89
- ? 0
90
- : toUsdValue.div(fromUsdValue).minus(1).multipliedBy(100);
91
-
92
41
  export const outToRatioHasWarning = (fromUsdValue: BigNumber | null, outToInRatio: BigNumber | 0) =>
93
42
  (parseInt(outToInRatio?.toFixed(2) || '0') <= -10 &&
94
43
  (fromUsdValue === null || fromUsdValue.gte(new BigNumber(200)))) ||
@@ -96,13 +45,15 @@ export const outToRatioHasWarning = (fromUsdValue: BigNumber | null, outToInRati
96
45
  (fromUsdValue === null || fromUsdValue.gte(new BigNumber(1000))));
97
46
 
98
47
  export const getRequiredBalanceOfWallet = (
99
- wallet: SelectedWallet,
48
+ selectedWallet: SelectedWallet,
100
49
  fee: SimulationValidationStatus[] | null,
101
50
  ): SimulationAssetAndAmount[] | null => {
102
51
  if (fee === null) return null;
103
52
  const relatedFeeStatus = fee
104
- ?.find((item) => item.blockchain === wallet.chain)
105
- ?.wallets.find((it) => it.address?.toLowerCase() === wallet.address.toLowerCase());
53
+ ?.find((item) => item.blockchain === selectedWallet.chain)
54
+ ?.wallets.find(
55
+ (wallet) => wallet.address?.toLowerCase() === selectedWallet.address.toLowerCase(),
56
+ );
106
57
  if (!relatedFeeStatus) return null;
107
58
  return relatedFeeStatus.requiredAssets;
108
59
  };