@unisat/wallet-state 1.1.0 → 1.2.0

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 (222) hide show
  1. package/lib/actions/global.d.ts +2 -0
  2. package/lib/actions/global.d.ts.map +1 -0
  3. package/lib/context/ApprovalContext.d.ts +9 -0
  4. package/lib/context/ApprovalContext.d.ts.map +1 -0
  5. package/lib/context/DeviceContext.d.ts +17 -0
  6. package/lib/context/DeviceContext.d.ts.map +1 -0
  7. package/lib/context/I18nContext.d.ts +13 -0
  8. package/lib/context/I18nContext.d.ts.map +1 -0
  9. package/lib/context/NavigationContext.d.ts +218 -0
  10. package/lib/context/NavigationContext.d.ts.map +1 -0
  11. package/lib/context/PriceContext.d.ts +13 -0
  12. package/lib/context/PriceContext.d.ts.map +1 -0
  13. package/lib/context/StorageContext.d.ts +60 -0
  14. package/lib/context/StorageContext.d.ts.map +1 -0
  15. package/lib/context/ToolsContext.d.ts +17 -0
  16. package/lib/context/ToolsContext.d.ts.map +1 -0
  17. package/lib/context/WalletContext.d.ts +493 -0
  18. package/lib/context/WalletContext.d.ts.map +1 -0
  19. package/lib/context/index.d.ts +9 -0
  20. package/lib/context/index.d.ts.map +1 -0
  21. package/lib/hooks/accounts.d.ts +34 -0
  22. package/lib/hooks/accounts.d.ts.map +1 -0
  23. package/lib/hooks/base.d.ts +14 -0
  24. package/lib/hooks/base.d.ts.map +1 -0
  25. package/lib/hooks/browser.d.ts +32 -0
  26. package/lib/hooks/browser.d.ts.map +1 -0
  27. package/lib/hooks/discovery.d.ts +17 -0
  28. package/lib/hooks/discovery.d.ts.map +1 -0
  29. package/lib/hooks/global.d.ts +43 -0
  30. package/lib/hooks/global.d.ts.map +1 -0
  31. package/lib/hooks/index.d.ts +10 -0
  32. package/lib/hooks/index.d.ts.map +1 -0
  33. package/lib/hooks/keyrings.d.ts +5 -0
  34. package/lib/hooks/keyrings.d.ts.map +1 -0
  35. package/lib/hooks/settings.d.ts +43 -0
  36. package/lib/hooks/settings.d.ts.map +1 -0
  37. package/lib/hooks/transactions.d.ts +67 -0
  38. package/lib/hooks/transactions.d.ts.map +1 -0
  39. package/lib/hooks/ui.d.ts +112 -0
  40. package/lib/hooks/ui.d.ts.map +1 -0
  41. package/lib/index.d.mts +79 -18
  42. package/lib/index.d.ts +31 -2758
  43. package/lib/index.d.ts.map +1 -0
  44. package/lib/index.js +291 -78
  45. package/lib/index.js.map +1 -1
  46. package/lib/index.mjs +289 -80
  47. package/lib/index.mjs.map +1 -1
  48. package/lib/reducers/accounts.d.ts +49 -0
  49. package/lib/reducers/accounts.d.ts.map +1 -0
  50. package/lib/reducers/browser.d.ts +49 -0
  51. package/lib/reducers/browser.d.ts.map +1 -0
  52. package/lib/reducers/discovery.d.ts +22 -0
  53. package/lib/reducers/discovery.d.ts.map +1 -0
  54. package/lib/reducers/global.d.ts +35 -0
  55. package/lib/reducers/global.d.ts.map +1 -0
  56. package/lib/reducers/index.d.ts +9 -0
  57. package/lib/reducers/index.d.ts.map +1 -0
  58. package/lib/reducers/keyrings.d.ts +10 -0
  59. package/lib/reducers/keyrings.d.ts.map +1 -0
  60. package/lib/reducers/settings.d.ts +16 -0
  61. package/lib/reducers/settings.d.ts.map +1 -0
  62. package/lib/reducers/transactions.d.ts +61 -0
  63. package/lib/reducers/transactions.d.ts.map +1 -0
  64. package/lib/reducers/ui.d.ts +55 -0
  65. package/lib/reducers/ui.d.ts.map +1 -0
  66. package/lib/types/index.d.mts +6 -2
  67. package/lib/types/index.d.ts +3 -30
  68. package/lib/types/index.d.ts.map +1 -0
  69. package/lib/types/index.js +7 -1
  70. package/lib/types/index.js.map +1 -1
  71. package/lib/types/index.mjs +7 -2
  72. package/lib/types/index.mjs.map +1 -1
  73. package/lib/types/ui.d.ts +31 -0
  74. package/lib/types/ui.d.ts.map +1 -0
  75. package/lib/ui-hooks/index.d.ts +55 -0
  76. package/lib/ui-hooks/index.d.ts.map +1 -0
  77. package/lib/ui-hooks/useActionOverviewSectionLogic.d.ts +12 -0
  78. package/lib/ui-hooks/useActionOverviewSectionLogic.d.ts.map +1 -0
  79. package/lib/ui-hooks/useAddressTypeScreenLogic.d.ts +19 -0
  80. package/lib/ui-hooks/useAddressTypeScreenLogic.d.ts.map +1 -0
  81. package/lib/ui-hooks/useAlkanesBalanceCardLogic.d.ts +19 -0
  82. package/lib/ui-hooks/useAlkanesBalanceCardLogic.d.ts.map +1 -0
  83. package/lib/ui-hooks/useAlkanesCollectionListLogic.d.ts +11 -0
  84. package/lib/ui-hooks/useAlkanesCollectionListLogic.d.ts.map +1 -0
  85. package/lib/ui-hooks/useAlkanesListLogic.d.ts +14 -0
  86. package/lib/ui-hooks/useAlkanesListLogic.d.ts.map +1 -0
  87. package/lib/ui-hooks/useAlkanesNFTListLogic.d.ts +11 -0
  88. package/lib/ui-hooks/useAlkanesNFTListLogic.d.ts.map +1 -0
  89. package/lib/ui-hooks/useAlkanesNFTScreenLogic.d.ts +9 -0
  90. package/lib/ui-hooks/useAlkanesNFTScreenLogic.d.ts.map +1 -0
  91. package/lib/ui-hooks/useAlkanesTokenScreenLogic.d.ts +22 -0
  92. package/lib/ui-hooks/useAlkanesTokenScreenLogic.d.ts.map +1 -0
  93. package/lib/ui-hooks/useAmountInputLogic.d.ts +22 -0
  94. package/lib/ui-hooks/useAmountInputLogic.d.ts.map +1 -0
  95. package/lib/ui-hooks/useAnnouncementCardLogic.d.ts +11 -0
  96. package/lib/ui-hooks/useAnnouncementCardLogic.d.ts.map +1 -0
  97. package/lib/ui-hooks/useBRC20BalanceCardLogic.d.ts +26 -0
  98. package/lib/ui-hooks/useBRC20BalanceCardLogic.d.ts.map +1 -0
  99. package/lib/ui-hooks/useBRC20InscribeTransferLogic.d.ts +103 -0
  100. package/lib/ui-hooks/useBRC20InscribeTransferLogic.d.ts.map +1 -0
  101. package/lib/ui-hooks/useBRC20ListLogic.d.ts +14 -0
  102. package/lib/ui-hooks/useBRC20ListLogic.d.ts.map +1 -0
  103. package/lib/ui-hooks/useBRC20ProgListLogic.d.ts +14 -0
  104. package/lib/ui-hooks/useBRC20ProgListLogic.d.ts.map +1 -0
  105. package/lib/ui-hooks/useBRC20SendScreenLogic.d.ts +67 -0
  106. package/lib/ui-hooks/useBRC20SendScreenLogic.d.ts.map +1 -0
  107. package/lib/ui-hooks/useBRC20SingleStepScreenLogic.d.ts +36 -0
  108. package/lib/ui-hooks/useBRC20SingleStepScreenLogic.d.ts.map +1 -0
  109. package/lib/ui-hooks/useBRC20TokenScreenLogic.d.ts +75 -0
  110. package/lib/ui-hooks/useBRC20TokenScreenLogic.d.ts.map +1 -0
  111. package/lib/ui-hooks/useBalanceCardLogic.d.ts +26 -0
  112. package/lib/ui-hooks/useBalanceCardLogic.d.ts.map +1 -0
  113. package/lib/ui-hooks/useBtcDisplayLogic.d.ts +5 -0
  114. package/lib/ui-hooks/useBtcDisplayLogic.d.ts.map +1 -0
  115. package/lib/ui-hooks/useCAT20BalanceCardLogic.d.ts +20 -0
  116. package/lib/ui-hooks/useCAT20BalanceCardLogic.d.ts.map +1 -0
  117. package/lib/ui-hooks/useCAT20ListLogic.d.ts +14 -0
  118. package/lib/ui-hooks/useCAT20ListLogic.d.ts.map +1 -0
  119. package/lib/ui-hooks/useCAT20TokenScreenLogic.d.ts +19 -0
  120. package/lib/ui-hooks/useCAT20TokenScreenLogic.d.ts.map +1 -0
  121. package/lib/ui-hooks/useCAT721ListLogic.d.ts +11 -0
  122. package/lib/ui-hooks/useCAT721ListLogic.d.ts.map +1 -0
  123. package/lib/ui-hooks/useCAT721NFTScreenLogic.d.ts +9 -0
  124. package/lib/ui-hooks/useCAT721NFTScreenLogic.d.ts.map +1 -0
  125. package/lib/ui-hooks/useCreatePasswordScreenLogic.d.ts +27 -0
  126. package/lib/ui-hooks/useCreatePasswordScreenLogic.d.ts.map +1 -0
  127. package/lib/ui-hooks/useCreateWalletLogicImportWordsStep.d.ts +78 -0
  128. package/lib/ui-hooks/useCreateWalletLogicImportWordsStep.d.ts.map +1 -0
  129. package/lib/ui-hooks/useEditAccountNameScreenLogic.d.ts +18 -0
  130. package/lib/ui-hooks/useEditAccountNameScreenLogic.d.ts.map +1 -0
  131. package/lib/ui-hooks/useEditContactScreenLogic.d.ts +24 -0
  132. package/lib/ui-hooks/useEditContactScreenLogic.d.ts.map +1 -0
  133. package/lib/ui-hooks/useEditWalletNameScreenLogic.d.ts +15 -0
  134. package/lib/ui-hooks/useEditWalletNameScreenLogic.d.ts.map +1 -0
  135. package/lib/ui-hooks/useExportMnemonicsScreenLogic.d.ts +18 -0
  136. package/lib/ui-hooks/useExportMnemonicsScreenLogic.d.ts.map +1 -0
  137. package/lib/ui-hooks/useExportPrivateKeyScreenLogic.d.ts +17 -0
  138. package/lib/ui-hooks/useExportPrivateKeyScreenLogic.d.ts.map +1 -0
  139. package/lib/ui-hooks/useFeeRateBarLogic.d.ts +34 -0
  140. package/lib/ui-hooks/useFeeRateBarLogic.d.ts.map +1 -0
  141. package/lib/ui-hooks/useInfiniteList.d.ts +19 -0
  142. package/lib/ui-hooks/useInfiniteList.d.ts.map +1 -0
  143. package/lib/ui-hooks/useInscriptionListLogic.d.ts +11 -0
  144. package/lib/ui-hooks/useInscriptionListLogic.d.ts.map +1 -0
  145. package/lib/ui-hooks/useLockTimePageLogic.d.ts +11 -0
  146. package/lib/ui-hooks/useLockTimePageLogic.d.ts.map +1 -0
  147. package/lib/ui-hooks/useNotificationsLogic.d.ts +14 -0
  148. package/lib/ui-hooks/useNotificationsLogic.d.ts.map +1 -0
  149. package/lib/ui-hooks/useOrdinalsInscriptionScreenLogic.d.ts +27 -0
  150. package/lib/ui-hooks/useOrdinalsInscriptionScreenLogic.d.ts.map +1 -0
  151. package/lib/ui-hooks/useRunesBalanceCardLogic.d.ts +19 -0
  152. package/lib/ui-hooks/useRunesBalanceCardLogic.d.ts.map +1 -0
  153. package/lib/ui-hooks/useRunesListLogic.d.ts +14 -0
  154. package/lib/ui-hooks/useRunesListLogic.d.ts.map +1 -0
  155. package/lib/ui-hooks/useRunesTokenScreenLogic.d.ts +22 -0
  156. package/lib/ui-hooks/useRunesTokenScreenLogic.d.ts.map +1 -0
  157. package/lib/ui-hooks/useSecurityCardLogic.d.ts +1 -0
  158. package/lib/ui-hooks/useSecurityCardLogic.d.ts.map +1 -0
  159. package/lib/ui-hooks/useSendAlkanesNFTScreenLogic.d.ts +32 -0
  160. package/lib/ui-hooks/useSendAlkanesNFTScreenLogic.d.ts.map +1 -0
  161. package/lib/ui-hooks/useSendAlkanesScreenLogic.d.ts +37 -0
  162. package/lib/ui-hooks/useSendAlkanesScreenLogic.d.ts.map +1 -0
  163. package/lib/ui-hooks/useSendCAT20ScreenLogic.d.ts +44 -0
  164. package/lib/ui-hooks/useSendCAT20ScreenLogic.d.ts.map +1 -0
  165. package/lib/ui-hooks/useSendCAT721ScreenLogic.d.ts +40 -0
  166. package/lib/ui-hooks/useSendCAT721ScreenLogic.d.ts.map +1 -0
  167. package/lib/ui-hooks/useSendOrdinalsInscriptionScreenLogic.d.ts +22 -0
  168. package/lib/ui-hooks/useSendOrdinalsInscriptionScreenLogic.d.ts.map +1 -0
  169. package/lib/ui-hooks/useSendRunesScreenLogic.d.ts +30 -0
  170. package/lib/ui-hooks/useSendRunesScreenLogic.d.ts.map +1 -0
  171. package/lib/ui-hooks/useSettingsTabScreenLogic.d.ts +72 -0
  172. package/lib/ui-hooks/useSettingsTabScreenLogic.d.ts.map +1 -0
  173. package/lib/ui-hooks/useSignMessageLogic.d.ts +54 -0
  174. package/lib/ui-hooks/useSignMessageLogic.d.ts.map +1 -0
  175. package/lib/ui-hooks/useSignPsbtLogic.d.ts +82 -0
  176. package/lib/ui-hooks/useSignPsbtLogic.d.ts.map +1 -0
  177. package/lib/ui-hooks/useSplitOrdinalsInscriptionScreenLogic.d.ts +15 -0
  178. package/lib/ui-hooks/useSplitOrdinalsInscriptionScreenLogic.d.ts.map +1 -0
  179. package/lib/ui-hooks/useTxConfirmScreenLogic.d.ts +8 -0
  180. package/lib/ui-hooks/useTxConfirmScreenLogic.d.ts.map +1 -0
  181. package/lib/ui-hooks/useTxCreateScreenLogic.d.ts +28 -0
  182. package/lib/ui-hooks/useTxCreateScreenLogic.d.ts.map +1 -0
  183. package/lib/ui-hooks/useTxFailScreenLogic.d.ts +7 -0
  184. package/lib/ui-hooks/useTxFailScreenLogic.d.ts.map +1 -0
  185. package/lib/ui-hooks/useTxSuccessScreenLogic.d.ts +8 -0
  186. package/lib/ui-hooks/useTxSuccessScreenLogic.d.ts.map +1 -0
  187. package/lib/updater/accounts.d.ts +2 -0
  188. package/lib/updater/accounts.d.ts.map +1 -0
  189. package/lib/updater/index.d.ts +2 -0
  190. package/lib/updater/index.d.ts.map +1 -0
  191. package/lib/utils/bitcoin-utils.d.ts +7 -0
  192. package/lib/utils/bitcoin-utils.d.ts.map +1 -0
  193. package/lib/utils/eventBus.d.ts +12 -0
  194. package/lib/utils/eventBus.d.ts.map +1 -0
  195. package/lib/utils/password-utils.d.ts +12 -0
  196. package/lib/utils/password-utils.d.ts.map +1 -0
  197. package/lib/utils/ui-utils.d.ts +4 -0
  198. package/lib/utils/ui-utils.d.ts.map +1 -0
  199. package/package.json +3 -3
  200. package/src/context/WalletContext.tsx +56 -23
  201. package/src/hooks/settings.ts +10 -0
  202. package/src/hooks/transactions.ts +23 -2
  203. package/src/hooks/ui.ts +9 -1
  204. package/src/reducers/accounts.ts +3 -0
  205. package/src/reducers/ui.ts +21 -0
  206. package/src/types/ui.ts +6 -1
  207. package/src/ui-hooks/useAlkanesTokenScreenLogic.ts +8 -0
  208. package/src/ui-hooks/useBRC20InscribeTransferLogic.ts +30 -10
  209. package/src/ui-hooks/useBRC20ListLogic.ts +6 -2
  210. package/src/ui-hooks/useBRC20ProgListLogic.ts +7 -3
  211. package/src/ui-hooks/useBRC20SendScreenLogic.ts +19 -6
  212. package/src/ui-hooks/useBRC20TokenScreenLogic.ts +44 -24
  213. package/src/ui-hooks/useCAT20TokenScreenLogic.ts +5 -0
  214. package/src/ui-hooks/useEditAccountNameScreenLogic.ts +4 -4
  215. package/src/ui-hooks/useEditWalletNameScreenLogic.ts +5 -3
  216. package/src/ui-hooks/useRunesTokenScreenLogic.ts +7 -0
  217. package/src/ui-hooks/useSendAlkanesNFTScreenLogic.ts +24 -2
  218. package/src/ui-hooks/useSendAlkanesScreenLogic.ts +17 -1
  219. package/src/ui-hooks/useSendOrdinalsInscriptionScreenLogic.ts +15 -0
  220. package/src/ui-hooks/useSendRunesScreenLogic.ts +18 -1
  221. package/src/ui-hooks/useSplitOrdinalsInscriptionScreenLogic.ts +15 -1
  222. package/src/ui-hooks/useTxCreateScreenLogic.ts +17 -1
package/lib/index.js CHANGED
@@ -150,6 +150,9 @@ var slice = toolkit.createSlice({
150
150
  setAddressSummary(state, action) {
151
151
  state.addressSummary = action.payload;
152
152
  },
153
+ setModelPopover(state, action) {
154
+ state.molelsPopover = action.payload;
155
+ },
153
156
  expireBalance(state) {
154
157
  const balance = state.balanceMap[state.current.address];
155
158
  if (balance) {
@@ -562,7 +565,7 @@ var AssetTabKey = /* @__PURE__ */ ((AssetTabKey2) => {
562
565
  AssetTabKey2[AssetTabKey2["ATOMICALS"] = 1] = "ATOMICALS";
563
566
  AssetTabKey2[AssetTabKey2["RUNES"] = 2] = "RUNES";
564
567
  AssetTabKey2[AssetTabKey2["CAT"] = 3] = "CAT";
565
- AssetTabKey2[AssetTabKey2["ALKANES"] = 4] = "ALKANES";
568
+ AssetTabKey2[AssetTabKey2["MORE"] = 4] = "MORE";
566
569
  return AssetTabKey2;
567
570
  })(AssetTabKey || {});
568
571
  var OrdinalsAssetTabKey = /* @__PURE__ */ ((OrdinalsAssetTabKey2) => {
@@ -583,6 +586,11 @@ var AlkanesAssetTabKey = /* @__PURE__ */ ((AlkanesAssetTabKey2) => {
583
586
  AlkanesAssetTabKey2[AlkanesAssetTabKey2["COLLECTION"] = 1] = "COLLECTION";
584
587
  return AlkanesAssetTabKey2;
585
588
  })(AlkanesAssetTabKey || {});
589
+ var MoreAssetTabKey = /* @__PURE__ */ ((MoreAssetTabKey2) => {
590
+ MoreAssetTabKey2[MoreAssetTabKey2["ALKANES_TOKEN"] = 0] = "ALKANES_TOKEN";
591
+ MoreAssetTabKey2[MoreAssetTabKey2["ALKANES_COLLECTION"] = 1] = "ALKANES_COLLECTION";
592
+ return MoreAssetTabKey2;
593
+ })(MoreAssetTabKey || {});
586
594
  var NavigationSource = /* @__PURE__ */ ((NavigationSource2) => {
587
595
  NavigationSource2[NavigationSource2["BACK"] = 0] = "BACK";
588
596
  NavigationSource2[NavigationSource2["NORMAL"] = 1] = "NORMAL";
@@ -595,12 +603,14 @@ var initialState7 = {
595
603
  ordinalsAssetTabKey: 0 /* ALL */,
596
604
  catAssetTabKey: 0 /* CAT20 */,
597
605
  alkanesAssetTabKey: 0 /* TOKEN */,
606
+ moreAssetTabKey: 0 /* ALKANES_TOKEN */,
598
607
  uiTxCreateScreen: {
599
608
  toInfo: {
600
609
  address: "",
601
610
  domain: ""
602
611
  },
603
- inputAmount: ""
612
+ inputAmount: "",
613
+ enableRBF: true
604
614
  },
605
615
  addressInput: {
606
616
  address: "",
@@ -649,6 +659,9 @@ var slice7 = toolkit.createSlice({
649
659
  if (payload.alkanesAssetTabKey !== void 0) {
650
660
  state.alkanesAssetTabKey = payload.alkanesAssetTabKey;
651
661
  }
662
+ if (payload.moreAssetTabKey !== void 0) {
663
+ state.moreAssetTabKey = payload.moreAssetTabKey;
664
+ }
652
665
  return state;
653
666
  },
654
667
  updateTxCreateScreen(state, action) {
@@ -658,6 +671,9 @@ var slice7 = toolkit.createSlice({
658
671
  if (action.payload.inputAmount !== void 0) {
659
672
  state.uiTxCreateScreen.inputAmount = action.payload.inputAmount;
660
673
  }
674
+ if (action.payload.enableRBF !== void 0) {
675
+ state.uiTxCreateScreen.enableRBF = action.payload.enableRBF;
676
+ }
661
677
  state.uiTxCreateScreen = { ...state.uiTxCreateScreen };
662
678
  },
663
679
  updateFeeRateBar(state, action) {
@@ -740,8 +756,16 @@ var slice7 = toolkit.createSlice({
740
756
  if (!state.alkanesAssetTabKey) {
741
757
  state.alkanesAssetTabKey = 0 /* TOKEN */;
742
758
  }
759
+ if (state.moreAssetTabKey === void 0) {
760
+ state.moreAssetTabKey = 0 /* ALKANES_TOKEN */;
761
+ }
762
+ if (state.assetTabKey === 4) {
763
+ state.assetTabKey = 4 /* MORE */;
764
+ }
743
765
  if (!state.uiTxCreateScreen) {
744
766
  state.uiTxCreateScreen = initialState7.uiTxCreateScreen;
767
+ } else if (state.uiTxCreateScreen.enableRBF === void 0) {
768
+ state.uiTxCreateScreen.enableRBF = true;
745
769
  }
746
770
  if (!state.feeRateBar) {
747
771
  state.feeRateBar = initialState7.feeRateBar;
@@ -1380,6 +1404,14 @@ function useBRC20TokenInfoExplorerUrl(ticker) {
1380
1404
  const chain = useChain();
1381
1405
  return `${chain.unisatExplorerUrl}/brc20/${encodeURIComponent(ticker)}`;
1382
1406
  }
1407
+ function useRunesTokenInfoExplorerUrl(runeId) {
1408
+ const chain = useChain();
1409
+ return `${chain.unisatExplorerUrl}/runes/detail/${encodeURIComponent(runeId)}`;
1410
+ }
1411
+ function useAlkanesTokenInfoExplorerUrl(alkaneId) {
1412
+ const chain = useChain();
1413
+ return `${chain.unisatExplorerUrl}/alkanes/detail/${encodeURIComponent(alkaneId)}`;
1414
+ }
1383
1415
  function useUnisatWebsite() {
1384
1416
  const chainType = useChainType();
1385
1417
  return walletShared.CHAINS_MAP[chainType].unisatUrl;
@@ -2125,7 +2157,8 @@ function usePrepareSendBTCCallback() {
2125
2157
  feeRate,
2126
2158
  memo,
2127
2159
  memos,
2128
- disableAutoAdjust
2160
+ disableAutoAdjust,
2161
+ enableRBF
2129
2162
  }) => {
2130
2163
  let _utxos = utxos;
2131
2164
  if (_utxos.length === 0) {
@@ -2144,7 +2177,8 @@ function usePrepareSendBTCCallback() {
2144
2177
  res = await wallet.createSendAllBTCPsbt({
2145
2178
  to: toAddressInfo.address,
2146
2179
  btcUtxos: _utxos,
2147
- feeRate
2180
+ feeRate,
2181
+ enableRBF
2148
2182
  });
2149
2183
  } else {
2150
2184
  res = await wallet.createSendBTCPsbt({
@@ -2152,6 +2186,7 @@ function usePrepareSendBTCCallback() {
2152
2186
  amount: toAmount,
2153
2187
  btcUtxos: _utxos,
2154
2188
  feeRate,
2189
+ enableRBF,
2155
2190
  memo,
2156
2191
  memos
2157
2192
  });
@@ -2168,7 +2203,8 @@ function usePrepareSendBypassHeadOffsetsCallback() {
2168
2203
  async ({
2169
2204
  toAddressInfo,
2170
2205
  toAmount,
2171
- feeRate
2206
+ feeRate,
2207
+ enableRBF
2172
2208
  }) => {
2173
2209
  const res = await wallet.createSendBTCOffsetPsbt(
2174
2210
  [
@@ -2177,7 +2213,8 @@ function usePrepareSendBypassHeadOffsetsCallback() {
2177
2213
  satoshis: toAmount
2178
2214
  }
2179
2215
  ],
2180
- feeRate
2216
+ feeRate,
2217
+ enableRBF
2181
2218
  );
2182
2219
  return res;
2183
2220
  },
@@ -2234,7 +2271,8 @@ function usePrepareSendOrdinalsInscriptionCallback() {
2234
2271
  toAddressInfo,
2235
2272
  inscriptionId,
2236
2273
  feeRate,
2237
- outputValue
2274
+ outputValue,
2275
+ enableRBF
2238
2276
  }) => {
2239
2277
  if (!feeRate) {
2240
2278
  const summary = await wallet.getFeeSummary();
@@ -2249,7 +2287,8 @@ function usePrepareSendOrdinalsInscriptionCallback() {
2249
2287
  inscriptionId,
2250
2288
  feeRate,
2251
2289
  outputValue,
2252
- btcUtxos
2290
+ btcUtxos,
2291
+ enableRBF
2253
2292
  });
2254
2293
  return toSignData;
2255
2294
  },
@@ -2266,7 +2305,8 @@ function usePrepareSendOrdinalsInscriptionsCallback() {
2266
2305
  async ({
2267
2306
  toAddressInfo,
2268
2307
  inscriptionIds,
2269
- feeRate
2308
+ feeRate,
2309
+ enableRBF
2270
2310
  }) => {
2271
2311
  if (!feeRate) {
2272
2312
  const summary = await wallet.getFeeSummary();
@@ -2280,7 +2320,8 @@ function usePrepareSendOrdinalsInscriptionsCallback() {
2280
2320
  to: toAddressInfo.address,
2281
2321
  inscriptionIds,
2282
2322
  feeRate,
2283
- btcUtxos
2323
+ btcUtxos,
2324
+ enableRBF
2284
2325
  });
2285
2326
  return res;
2286
2327
  },
@@ -2298,7 +2339,8 @@ function useCreateSplitTxCallback() {
2298
2339
  async ({
2299
2340
  inscriptionId,
2300
2341
  feeRate,
2301
- outputValue
2342
+ outputValue,
2343
+ enableRBF
2302
2344
  }) => {
2303
2345
  let btcUtxos = utxos;
2304
2346
  if (btcUtxos.length === 0) {
@@ -2308,7 +2350,8 @@ function useCreateSplitTxCallback() {
2308
2350
  inscriptionId,
2309
2351
  feeRate,
2310
2352
  outputValue,
2311
- btcUtxos
2353
+ btcUtxos,
2354
+ enableRBF
2312
2355
  });
2313
2356
  return res;
2314
2357
  },
@@ -2417,7 +2460,8 @@ function usePrepareSendRunesCallback() {
2417
2460
  runeid,
2418
2461
  runeAmount,
2419
2462
  outputValue,
2420
- feeRate
2463
+ feeRate,
2464
+ enableRBF
2421
2465
  }) => {
2422
2466
  if (!feeRate) {
2423
2467
  const summary = await wallet.getFeeSummary();
@@ -2438,7 +2482,8 @@ function usePrepareSendRunesCallback() {
2438
2482
  outputValue,
2439
2483
  feeRate,
2440
2484
  btcUtxos,
2441
- assetUtxos
2485
+ assetUtxos,
2486
+ enableRBF
2442
2487
  });
2443
2488
  return toSignData;
2444
2489
  },
@@ -2453,13 +2498,14 @@ function usePrepareSendAlkanesCallback() {
2453
2498
  const wallet = useWallet();
2454
2499
  const account = useCurrentAccount();
2455
2500
  const callback = React.useCallback(
2456
- async (toAddressInfo, alkaneid, amount, feeRate, type) => {
2501
+ async (toAddressInfo, alkaneid, amount, feeRate, type, enableRBF) => {
2457
2502
  return await wallet.createSendAlkanesPsbt({
2458
2503
  to: toAddressInfo.address,
2459
2504
  alkaneid,
2460
2505
  amount,
2461
2506
  feeRate,
2462
- type
2507
+ type,
2508
+ enableRBF
2463
2509
  });
2464
2510
  },
2465
2511
  [wallet, account]
@@ -2485,6 +2531,10 @@ function useAlkanesAssetTabKey() {
2485
2531
  const uiState = useUIState();
2486
2532
  return uiState.alkanesAssetTabKey;
2487
2533
  }
2534
+ function useMoreAssetTabKey() {
2535
+ const uiState = useUIState();
2536
+ return uiState.moreAssetTabKey;
2537
+ }
2488
2538
  function useUiTxCreateScreen() {
2489
2539
  const uiState = useUIState();
2490
2540
  return uiState.uiTxCreateScreen;
@@ -2493,12 +2543,14 @@ function useUpdateUiTxCreateScreen() {
2493
2543
  const dispatch = useAppDispatch();
2494
2544
  return ({
2495
2545
  toInfo,
2496
- inputAmount
2546
+ inputAmount,
2547
+ enableRBF
2497
2548
  }) => {
2498
2549
  dispatch(
2499
2550
  uiActions.updateTxCreateScreen({
2500
2551
  toInfo,
2501
- inputAmount
2552
+ inputAmount,
2553
+ enableRBF
2502
2554
  })
2503
2555
  );
2504
2556
  };
@@ -2621,7 +2673,7 @@ function getSupportedAssets(chainType, address) {
2621
2673
  }
2622
2674
  if (chainType === walletTypes.ChainType.BITCOIN_MAINNET || chainType === walletTypes.ChainType.BITCOIN_SIGNET) {
2623
2675
  assets.alkanes = true;
2624
- assetTabKeys.push(4 /* ALKANES */);
2676
+ assetTabKeys.push(4 /* MORE */);
2625
2677
  }
2626
2678
  if (chainType === walletTypes.ChainType.BITCOIN_MAINNET || chainType === walletTypes.ChainType.BITCOIN_SIGNET) {
2627
2679
  assets.brc20Prog = true;
@@ -3232,6 +3284,7 @@ var BRC20SendTabKey = /* @__PURE__ */ ((BRC20SendTabKey2) => {
3232
3284
  })(BRC20SendTabKey || {});
3233
3285
  function useBRC20SendScreenLogic() {
3234
3286
  const nav = useNavigation();
3287
+ const wallet = useWallet();
3235
3288
  const props = nav.getRouteState();
3236
3289
  const tokenBalance = props.tokenBalance;
3237
3290
  const selectedInscriptionIds = props.selectedInscriptionIds || [];
@@ -3243,6 +3296,7 @@ function useBRC20SendScreenLogic() {
3243
3296
  transferableList: [],
3244
3297
  inscriptionIdSet: new Set(selectedInscriptionIds),
3245
3298
  receiver: "",
3299
+ enableRBF: true,
3246
3300
  rawTxInfo: {
3247
3301
  psbtHex: "",
3248
3302
  rawtx: ""
@@ -3282,6 +3336,11 @@ function useBRC20SendScreenLogic() {
3282
3336
  updateContextData({ tabKey: key });
3283
3337
  };
3284
3338
  const { t } = useI18n();
3339
+ React.useEffect(() => {
3340
+ wallet.getEnableRBF().then((enableRBF) => {
3341
+ updateContextData({ enableRBF });
3342
+ });
3343
+ }, [wallet, updateContextData]);
3285
3344
  return {
3286
3345
  t,
3287
3346
  contextData,
@@ -3353,14 +3412,16 @@ function useBRC20SendScreenLogicStep2({
3353
3412
  toAddressInfo: { address: contextData.receiver, domain: "" },
3354
3413
  inscriptionId: inscriptionIds[0],
3355
3414
  feeRate: feeRateBar.feeRate,
3356
- outputValue: getAddressUtxoDust(contextData.receiver)
3415
+ outputValue: getAddressUtxoDust(contextData.receiver),
3416
+ enableRBF: contextData.enableRBF
3357
3417
  });
3358
3418
  nav.navigate("TxConfirmScreen", { toSignData });
3359
3419
  } else {
3360
3420
  const toSignData = await prepareSendOrdinalsInscriptions({
3361
3421
  toAddressInfo: { address: contextData.receiver, domain: "" },
3362
3422
  inscriptionIds,
3363
- feeRate: feeRateBar.feeRate
3423
+ feeRate: feeRateBar.feeRate,
3424
+ enableRBF: contextData.enableRBF
3364
3425
  });
3365
3426
  nav.navigate("TxConfirmScreen", { toSignData });
3366
3427
  }
@@ -3443,12 +3504,13 @@ function useTransferableListLogic({ contextData, updateContextData }) {
3443
3504
  const fetchData = async () => {
3444
3505
  try {
3445
3506
  setLoading(true);
3446
- const { list, total: total2 } = await wallet.getBRC20TransferableList(
3447
- currentAccount.address,
3448
- contextData.tokenBalance.ticker,
3449
- pagination.currentPage,
3450
- pagination.pageSize
3451
- );
3507
+ const { list, total: total2 } = await wallet.getBRC20TransferableList({
3508
+ address: currentAccount.address,
3509
+ ticker: contextData.tokenBalance.ticker,
3510
+ tickerHex: contextData.tokenBalance.tickerHex,
3511
+ currentPage: pagination.currentPage,
3512
+ pageSize: pagination.pageSize
3513
+ });
3452
3514
  setItems(list);
3453
3515
  setTotal(total2);
3454
3516
  } catch (e) {
@@ -3735,6 +3797,7 @@ var BRC20TokenScreenTabKey = /* @__PURE__ */ ((BRC20TokenScreenTabKey2) => {
3735
3797
  BRC20TokenScreenTabKey2["HISTORY"] = "history";
3736
3798
  return BRC20TokenScreenTabKey2;
3737
3799
  })(BRC20TokenScreenTabKey || {});
3800
+ var INSWAP_SWAP_ANCHOR = "#swap";
3738
3801
  function useBRC20TokenHistoryLogic(props) {
3739
3802
  const wallet = useWallet();
3740
3803
  const { t } = useI18n();
@@ -3856,6 +3919,7 @@ function useBRC20TokenScreenLogic() {
3856
3919
  const [tokenSummary, setTokenSummary] = React.useState({
3857
3920
  tokenBalance: {
3858
3921
  ticker,
3922
+ tickerHex: Buffer.from(ticker).toString("hex"),
3859
3923
  overallBalance: "",
3860
3924
  availableBalance: "",
3861
3925
  transferableBalance: "",
@@ -3882,7 +3946,10 @@ function useBRC20TokenScreenLogic() {
3882
3946
  const [deployInscription, setDeployInscription] = React.useState();
3883
3947
  const resetTxState = useResetTxState();
3884
3948
  React.useEffect(() => {
3885
- wallet.getBRC20Summary(account.address, ticker).then((tokenSummary2) => {
3949
+ wallet.getBRC20Summary({
3950
+ address: account.address,
3951
+ ticker
3952
+ }).then((tokenSummary2) => {
3886
3953
  if (tokenSummary2.tokenInfo.holder == account.address) {
3887
3954
  wallet.getInscriptionInfo(tokenSummary2.tokenInfo.inscriptionId).then((data) => {
3888
3955
  setDeployInscription(data);
@@ -3954,6 +4021,10 @@ function useBRC20TokenScreenLogic() {
3954
4021
  return items;
3955
4022
  }
3956
4023
  }, [t, enableHistory]);
4024
+ const showSwapBalance = chain.isFractal;
4025
+ const showProgBalance = chain.enableBrc20Prog;
4026
+ const swapSiteEnabled = chain.enum === walletTypes.ChainType.FRACTAL_BITCOIN_MAINNET;
4027
+ const progSiteEnabled = chain.enum === walletTypes.ChainType.BITCOIN_MAINNET;
3957
4028
  const onSwapBalance = tokenSummary?.tokenBalance?.swapBalance;
3958
4029
  const onProgBalance = tokenSummary?.tokenBalance?.progBalance;
3959
4030
  const inWalletBalance = tokenSummary?.tokenBalance?.overallBalance;
@@ -3965,14 +4036,14 @@ function useBRC20TokenScreenLogic() {
3965
4036
  amount: inWalletBalance || "0"
3966
4037
  }
3967
4038
  ];
3968
- if (onSwapBalance && onSwapBalance !== "0") {
4039
+ if (showSwapBalance) {
3969
4040
  items.push({
3970
4041
  key: "swap",
3971
4042
  label: t("brc20_on_swap"),
3972
4043
  amount: onSwapBalance
3973
4044
  });
3974
4045
  }
3975
- if (onProgBalance && onProgBalance !== "0") {
4046
+ if (showProgBalance) {
3976
4047
  items.push({
3977
4048
  key: "prog",
3978
4049
  label: t("brc20_on_prog"),
@@ -3987,47 +4058,61 @@ function useBRC20TokenScreenLogic() {
3987
4058
  }
3988
4059
  return new BigNumber__default.default(inWalletBalance).plus(new BigNumber__default.default(onSwapBalance || 0)).plus(new BigNumber__default.default(onProgBalance || 0)).toString();
3989
4060
  }, [onSwapBalance, onProgBalance, inWalletBalance]);
3990
- let hasOutWalletBalance = false;
3991
- if (onSwapBalance && onSwapBalance !== "0") {
3992
- hasOutWalletBalance = true;
3993
- }
3994
- if (onProgBalance && onProgBalance !== "0") {
3995
- hasOutWalletBalance = true;
3996
- }
4061
+ const brc20prog_ticker = encodeURIComponent(ticker);
4062
+ const ensureSiteEnabled = (enabled) => {
4063
+ if (!enabled) {
4064
+ tools.toastError(t("not_supported"));
4065
+ return false;
4066
+ }
4067
+ return true;
4068
+ };
3997
4069
  const onClickWrapBrc20Prog = () => {
3998
- const url = `https://link.unisat.space/btc/wrap?tick=${encodeURIComponent(ticker)}`;
4070
+ if (!ensureSiteEnabled(progSiteEnabled))
4071
+ return;
4072
+ const url = `https://link.unisat.space/btc/wrap?tick=${brc20prog_ticker}`;
3999
4073
  nav.navToUrl(url);
4000
4074
  };
4001
4075
  const onClickUnwrapBrc20Prog = () => {
4002
- const url = `https://link.unisat.space/btc/wrap?action=unwrap&tick=${encodeURIComponent(ticker)}`;
4076
+ if (!ensureSiteEnabled(progSiteEnabled))
4077
+ return;
4078
+ const url = `https://link.unisat.space/btc/wrap?action=unwrap&tick=${brc20prog_ticker}`;
4003
4079
  nav.navToUrl(url);
4004
4080
  };
4005
4081
  const onClickSendBrc20Prog = () => {
4006
- const url = `https://bestinslot.xyz/brc2.0/${encodeURIComponent(ticker)}/transfer`;
4082
+ if (!ensureSiteEnabled(progSiteEnabled))
4083
+ return;
4084
+ const url = `https://bestinslot.xyz/brc2.0/${brc20prog_ticker}/transfer`;
4007
4085
  nav.navToUrl(url);
4008
4086
  };
4087
+ const inswap_ticker = encodeURIComponent(ticker);
4009
4088
  const onClickSwapInSwap = () => {
4010
- const url = `https://inswap.cc/swap?t0=${encodeURIComponent(ticker)}`;
4089
+ if (!ensureSiteEnabled(swapSiteEnabled))
4090
+ return;
4091
+ const url = `https://inswap.cc/swap/pools?q=${inswap_ticker}`;
4011
4092
  nav.navToUrl(url);
4012
4093
  };
4013
4094
  const onClickAddLiquidityInSwap = () => {
4014
- const url = `https://inswap.cc/swap/pools?t0=${encodeURIComponent(ticker)}&t1=sFB___000&action=add`;
4015
- nav.navToUrl(url);
4016
- };
4017
- const onClickRemoveLiquidityInSwap = () => {
4018
- const url = `https://inswap.cc/swap/pools?t0=${encodeURIComponent(ticker)}&t1=sFB___000&action=remove`;
4095
+ if (!ensureSiteEnabled(swapSiteEnabled))
4096
+ return;
4097
+ const url = `https://inswap.cc/swap/pools?q=${inswap_ticker}`;
4019
4098
  nav.navToUrl(url);
4020
4099
  };
4021
4100
  const onClickWrapInSwap = () => {
4022
- const url = `https://inswap.cc/swap?tab=deposit&t=${encodeURIComponent(ticker)}`;
4101
+ if (!ensureSiteEnabled(swapSiteEnabled))
4102
+ return;
4103
+ const url = `https://inswap.cc/swap?tab=deposit&t=${inswap_ticker}${INSWAP_SWAP_ANCHOR}`;
4023
4104
  nav.navToUrl(url);
4024
4105
  };
4025
4106
  const onClickUnwrapInSwap = () => {
4026
- const url = `https://inswap.cc/swap?tab=withdraw&t=${encodeURIComponent(ticker)}`;
4107
+ if (!ensureSiteEnabled(swapSiteEnabled))
4108
+ return;
4109
+ const url = `https://inswap.cc/swap?tab=withdraw&t=${inswap_ticker}${INSWAP_SWAP_ANCHOR}`;
4027
4110
  nav.navToUrl(url);
4028
4111
  };
4029
4112
  const onClickSendInSwap = () => {
4030
- const url = `https://inswap.cc/swap/assets/account`;
4113
+ if (!ensureSiteEnabled(swapSiteEnabled))
4114
+ return;
4115
+ const url = `https://inswap.cc/swap/assets/account?tab=assets&t=${inswap_ticker}&action=send`;
4031
4116
  nav.navToUrl(url);
4032
4117
  };
4033
4118
  const onClickMint = () => {
@@ -4057,7 +4142,6 @@ function useBRC20TokenScreenLogic() {
4057
4142
  onProgBalance,
4058
4143
  inWalletBalance,
4059
4144
  outWalletBalanceItems,
4060
- hasOutWalletBalance,
4061
4145
  enableHistory,
4062
4146
  enableTrade,
4063
4147
  enableMint,
@@ -4074,12 +4158,13 @@ function useBRC20TokenScreenLogic() {
4074
4158
  tools,
4075
4159
  isBrc20Prog,
4076
4160
  iconInfo,
4161
+ showProgBalance,
4162
+ showSwapBalance,
4077
4163
  onClickWrapBrc20Prog,
4078
4164
  onClickUnwrapBrc20Prog,
4079
4165
  onClickSendBrc20Prog,
4080
4166
  onClickSwapInSwap,
4081
4167
  onClickAddLiquidityInSwap,
4082
- onClickRemoveLiquidityInSwap,
4083
4168
  onClickWrapInSwap,
4084
4169
  onClickUnwrapInSwap,
4085
4170
  onClickSendInSwap,
@@ -4117,14 +4202,14 @@ function useEditWalletNameScreenLogic() {
4117
4202
  return true;
4118
4203
  }, [alianName]);
4119
4204
  const truncatedTitle = React.useMemo(() => {
4120
- if (keyring.alianName && keyring.alianName.length > 20) {
4121
- return keyring.alianName.slice(0, 20) + "...";
4205
+ if (keyring.alianName && keyring.alianName.length > walletShared.MAX_ALIAS_NAME_LENGTH) {
4206
+ return keyring.alianName.slice(0, walletShared.MAX_ALIAS_NAME_LENGTH) + "...";
4122
4207
  }
4123
4208
  return keyring.alianName || "";
4124
4209
  }, [keyring.alianName]);
4125
4210
  const onInputChange = (e) => {
4126
4211
  const value = typeof e === "string" ? e : e.target.value;
4127
- if (value.length <= 20) {
4212
+ if (value.length <= walletShared.MAX_ALIAS_NAME_LENGTH) {
4128
4213
  setAlianName(value);
4129
4214
  }
4130
4215
  };
@@ -4511,13 +4596,23 @@ function useSendOrdinalsInscriptionScreenLogic() {
4511
4596
  const { feeRate } = useFeeRateBar();
4512
4597
  const defaultOutputValue = inscription ? inscription.outputValue : 1e4;
4513
4598
  const [outputValue, setOutputValue] = React.useState(defaultOutputValue);
4599
+ const [enableRBF, setEnableRBF] = React.useState(true);
4514
4600
  const [inscriptions, setInscriptions] = React.useState([]);
4515
4601
  const wallet = useWallet();
4602
+ React.useEffect(() => {
4603
+ wallet.getEnableRBF().then((enableRBF2) => {
4604
+ setEnableRBF(enableRBF2);
4605
+ });
4606
+ }, [wallet]);
4516
4607
  React.useEffect(() => {
4517
4608
  wallet.getInscriptionUtxoDetail(inscription.inscriptionId).then((v) => {
4518
4609
  setInscriptions(v.inscriptions);
4519
4610
  });
4520
4611
  }, []);
4612
+ const onEnableRBFChange = (value) => {
4613
+ setEnableRBF(value);
4614
+ wallet.setEnableRBF(value);
4615
+ };
4521
4616
  const minOutputValue = React.useMemo(() => {
4522
4617
  if (toInfo.address) {
4523
4618
  return getAddressUtxoDust(toInfo.address);
@@ -4566,7 +4661,8 @@ function useSendOrdinalsInscriptionScreenLogic() {
4566
4661
  toAddressInfo: toInfo,
4567
4662
  inscriptionId: inscription.inscriptionId,
4568
4663
  feeRate,
4569
- outputValue
4664
+ outputValue,
4665
+ enableRBF
4570
4666
  }).then((toSignData) => {
4571
4667
  nav.navigate("TxConfirmScreen", { toSignData });
4572
4668
  }).catch((e) => {
@@ -4579,6 +4675,8 @@ function useSendOrdinalsInscriptionScreenLogic() {
4579
4675
  onAddressInputChange,
4580
4676
  toInfo,
4581
4677
  outputValue,
4678
+ enableRBF,
4679
+ setEnableRBF: onEnableRBFChange,
4582
4680
  minOutputValue,
4583
4681
  defaultOutputValue,
4584
4682
  setOutputValue,
@@ -4600,10 +4698,12 @@ function useTxCreateScreenLogic() {
4600
4698
  const feeRateBarState = useFeeRateBar();
4601
4699
  const toInfo = uiState.toInfo;
4602
4700
  const inputAmount = uiState.inputAmount;
4701
+ const enableRBF = uiState.enableRBF;
4603
4702
  const feeRate = feeRateBarState.feeRate;
4604
4703
  const [error, setError] = React.useState("");
4605
4704
  const [autoAdjust, setAutoAdjust] = React.useState(false);
4606
4705
  const fetchUtxos = useFetchUtxosCallback();
4706
+ const wallet = useWallet();
4607
4707
  const tools = useTools();
4608
4708
  React.useEffect(() => {
4609
4709
  tools.showLoading(true);
@@ -4611,6 +4711,11 @@ function useTxCreateScreenLogic() {
4611
4711
  tools.showLoading(false);
4612
4712
  });
4613
4713
  }, []);
4714
+ React.useEffect(() => {
4715
+ wallet.getEnableRBF().then((enableRBF2) => {
4716
+ setUiState({ enableRBF: enableRBF2 });
4717
+ });
4718
+ }, [wallet, setUiState]);
4614
4719
  const prepareSendBTC = usePrepareSendBTCCallback();
4615
4720
  const toSatoshis = React.useMemo(() => {
4616
4721
  if (!inputAmount)
@@ -4667,8 +4772,12 @@ function useTxCreateScreenLogic() {
4667
4772
  setAutoAdjust(true);
4668
4773
  setUiState({ inputAmount: availableAmount.toString() });
4669
4774
  };
4775
+ const onRBFChange = (value) => {
4776
+ setUiState({ enableRBF: value });
4777
+ wallet.setEnableRBF(value);
4778
+ };
4670
4779
  const onClickNext = () => {
4671
- prepareSendBTC({ toAddressInfo: toInfo, toAmount: toSatoshis, feeRate }).then((toSignData) => {
4780
+ prepareSendBTC({ toAddressInfo: toInfo, toAmount: toSatoshis, feeRate, enableRBF }).then((toSignData) => {
4672
4781
  nav.navigate("TxConfirmScreen", {
4673
4782
  toSignData
4674
4783
  });
@@ -4686,6 +4795,8 @@ function useTxCreateScreenLogic() {
4686
4795
  inputAmount,
4687
4796
  onAmountInputChange,
4688
4797
  onAmountMaxClick,
4798
+ enableRBF,
4799
+ onRBFChange,
4689
4800
  showUnavailable,
4690
4801
  availableAmount,
4691
4802
  unavailableAmount,
@@ -4705,14 +4816,12 @@ function useBRC20InscribeTransferLogic() {
4705
4816
  const [contextData, setContextData] = React.useState({
4706
4817
  step: 0 /* STEP1 */,
4707
4818
  ticker,
4708
- isApproval: false
4819
+ isApproval: false,
4820
+ enableRBF: true
4709
4821
  });
4710
- const updateContextData = React.useCallback(
4711
- (params) => {
4712
- setContextData(Object.assign({}, contextData, params));
4713
- },
4714
- [contextData, setContextData]
4715
- );
4822
+ const updateContextData = React.useCallback((params) => {
4823
+ setContextData((prev) => Object.assign({}, prev, params));
4824
+ }, []);
4716
4825
  return {
4717
4826
  contextData,
4718
4827
  updateContextData
@@ -4748,6 +4857,11 @@ function useBRC20InscribeTransferLogicStep1(params) {
4748
4857
  setInputDisabled(true);
4749
4858
  }
4750
4859
  }, []);
4860
+ React.useEffect(() => {
4861
+ wallet.getEnableRBF().then((enableRBF) => {
4862
+ updateContextData({ enableRBF });
4863
+ });
4864
+ }, []);
4751
4865
  React.useEffect(() => {
4752
4866
  setInputError("");
4753
4867
  setInputErrorAvailable("");
@@ -4794,7 +4908,10 @@ function useBRC20InscribeTransferLogicStep1(params) {
4794
4908
  }, [inputAmount, feeRateBarState.feeRate, outputValue, contextData.tokenBalance]);
4795
4909
  React.useEffect(() => {
4796
4910
  fetchUtxos();
4797
- wallet.getBRC20Summary(account.address, contextData.ticker).then((v) => {
4911
+ wallet.getBRC20Summary({
4912
+ address: account.address,
4913
+ ticker: contextData.ticker
4914
+ }).then((v) => {
4798
4915
  updateContextData({ tokenBalance: v.tokenBalance, tokenInfo: v.tokenInfo });
4799
4916
  setTimeout(() => {
4800
4917
  setLoading(false);
@@ -4817,7 +4934,8 @@ function useBRC20InscribeTransferLogicStep1(params) {
4817
4934
  const toSignData = await prepareSendBypassHeadOffsets({
4818
4935
  toAddressInfo: { address: order.payAddress, domain: "" },
4819
4936
  toAmount: order.totalFee,
4820
- feeRate: feeRateBarState.feeRate
4937
+ feeRate: feeRateBarState.feeRate,
4938
+ enableRBF: contextData.enableRBF
4821
4939
  });
4822
4940
  updateContextData({ order, amount, toSignData, step: 1 /* STEP2 */ });
4823
4941
  } catch (e) {
@@ -4839,6 +4957,11 @@ function useBRC20InscribeTransferLogicStep1(params) {
4839
4957
  defaultOutputValue,
4840
4958
  setOutputValue,
4841
4959
  disabled,
4960
+ enableRBF: contextData.enableRBF,
4961
+ setEnableRBF: (value) => {
4962
+ updateContextData({ enableRBF: value });
4963
+ wallet.setEnableRBF(value);
4964
+ },
4842
4965
  loadingOnly,
4843
4966
  handleCancel
4844
4967
  };
@@ -4916,9 +5039,11 @@ function useBRC20InscribeTransferLogicStep3(params) {
4916
5039
  const onSignPsbtHandleConfirm = async (signedDatas) => {
4917
5040
  tools.showLoading(true);
4918
5041
  try {
4919
- const { success, txid, error } = await pushBitcoinTx(signedDatas[0].psbtHex);
5042
+ const { success, error } = await pushBitcoinTx(signedDatas[0].psbtHex);
4920
5043
  if (success) {
4921
- nav.navigate("TxSuccessScreen", { txid });
5044
+ updateContextData({
5045
+ step: 3 /* STEP4 */
5046
+ });
4922
5047
  } else {
4923
5048
  throw new Error(error);
4924
5049
  }
@@ -4962,7 +5087,10 @@ function useBRC20InscribeTransferLogicStep4(params) {
4962
5087
  }, []);
4963
5088
  const onClickConfirm = () => {
4964
5089
  tools.showLoading(true);
4965
- wallet.getBRC20Summary(currentAccount.address, tokenBalance.ticker).then((v) => {
5090
+ wallet.getBRC20Summary({
5091
+ address: currentAccount.address,
5092
+ ticker: tokenBalance.ticker
5093
+ }).then((v) => {
4966
5094
  if (contextData.isApproval) {
4967
5095
  resolveApproval({
4968
5096
  inscriptionId: result.inscriptionId,
@@ -5104,6 +5232,10 @@ function useAlkanesTokenScreenLogic() {
5104
5232
  tokenSummary.tokenBalance.name,
5105
5233
  tokenSummary.tokenBalance.alkaneid
5106
5234
  );
5235
+ const alkanesExplorerUrl = useAlkanesTokenInfoExplorerUrl(tokenSummary.tokenInfo.alkaneid);
5236
+ const onClickViewOnExplorer = () => {
5237
+ nav.navToUrl(alkanesExplorerUrl);
5238
+ };
5107
5239
  return {
5108
5240
  tokenSummary,
5109
5241
  loading,
@@ -5117,6 +5249,7 @@ function useAlkanesTokenScreenLogic() {
5117
5249
  onClickMint,
5118
5250
  onClickSend,
5119
5251
  onClickTrade,
5252
+ onClickViewOnExplorer,
5120
5253
  iconInfo
5121
5254
  };
5122
5255
  }
@@ -5497,6 +5630,7 @@ function useRunesTokenScreenLogic() {
5497
5630
  const iconInfo = useRunesIconInfo(tokenSummary.runeInfo.spacedRune);
5498
5631
  const inscribeUrl = useRunesInscribeUrl(tokenSummary.runeInfo.rune);
5499
5632
  const marketPlaceUrl = useRunesMarketUrl(tokenSummary.runeInfo.spacedRune);
5633
+ const runesExplorerUrl = useRunesTokenInfoExplorerUrl(tokenSummary.runeInfo.runeid);
5500
5634
  const onClickMint = () => {
5501
5635
  nav.navToUrl(inscribeUrl);
5502
5636
  };
@@ -5512,6 +5646,9 @@ function useRunesTokenScreenLogic() {
5512
5646
  nav.navToUrl(marketPlaceUrl);
5513
5647
  }
5514
5648
  };
5649
+ const onClickViewOnExplorer = () => {
5650
+ nav.navToUrl(runesExplorerUrl);
5651
+ };
5515
5652
  return {
5516
5653
  runeid,
5517
5654
  tokenSummary,
@@ -5526,7 +5663,8 @@ function useRunesTokenScreenLogic() {
5526
5663
  enableTransfer,
5527
5664
  onClickSend,
5528
5665
  enableTrade,
5529
- onClickTrade
5666
+ onClickTrade,
5667
+ onClickViewOnExplorer
5530
5668
  };
5531
5669
  }
5532
5670
  function useBRC20BalanceCardLogic(props) {
@@ -5742,6 +5880,7 @@ function useSendRunesScreenLogic() {
5742
5880
  const defaultOutputValue = 546;
5743
5881
  const currentAccount = useCurrentAccount();
5744
5882
  const [outputValue, setOutputValue] = React.useState(defaultOutputValue);
5883
+ const [enableRBF, setEnableRBF] = React.useState(true);
5745
5884
  const minOutputValue = React.useMemo(() => {
5746
5885
  if (toInfo.address) {
5747
5886
  const dust1 = getAddressUtxoDust(currentAccount.address);
@@ -5752,6 +5891,7 @@ function useSendRunesScreenLogic() {
5752
5891
  }
5753
5892
  }, [toInfo.address, currentAccount.address]);
5754
5893
  const fetchUtxos = useFetchUtxosCallback();
5894
+ const wallet = useWallet();
5755
5895
  const fetchAssetUtxosRunes = useFetchAssetUtxosRunesCallback();
5756
5896
  const tools = useTools();
5757
5897
  React.useEffect(() => {
@@ -5776,6 +5916,11 @@ function useSendRunesScreenLogic() {
5776
5916
  }, []);
5777
5917
  const prepareSendRunes = usePrepareSendRunesCallback();
5778
5918
  const { feeRate } = useFeeRateBar();
5919
+ React.useEffect(() => {
5920
+ wallet.getEnableRBF().then((enableRBF2) => {
5921
+ setEnableRBF(enableRBF2);
5922
+ });
5923
+ }, [wallet]);
5779
5924
  React.useEffect(() => {
5780
5925
  setError("");
5781
5926
  setDisabled(true);
@@ -5814,6 +5959,10 @@ function useSendRunesScreenLogic() {
5814
5959
  const onClickBack = () => {
5815
5960
  nav.goBack();
5816
5961
  };
5962
+ const onEnableRBFChange = (value) => {
5963
+ setEnableRBF(value);
5964
+ wallet.setEnableRBF(value);
5965
+ };
5817
5966
  const onClickNext = () => {
5818
5967
  const runeAmount = baseUtils.bnUtils.fromDecimalAmount(inputAmount, runeInfo.divisibility);
5819
5968
  prepareSendRunes({
@@ -5821,7 +5970,8 @@ function useSendRunesScreenLogic() {
5821
5970
  runeid: runeInfo.runeid,
5822
5971
  runeAmount,
5823
5972
  outputValue,
5824
- feeRate
5973
+ feeRate,
5974
+ enableRBF
5825
5975
  }).then((toSignData) => {
5826
5976
  nav.navigate("TxConfirmScreen", { toSignData });
5827
5977
  }).catch((e) => {
@@ -5843,6 +5993,8 @@ function useSendRunesScreenLogic() {
5843
5993
  defaultOutputValue,
5844
5994
  minOutputValue,
5845
5995
  setOutputValue,
5996
+ enableRBF,
5997
+ setEnableRBF: onEnableRBFChange,
5846
5998
  t,
5847
5999
  // actions
5848
6000
  onClickBack,
@@ -6005,14 +6157,14 @@ function useEditAccountNameScreenLogic() {
6005
6157
  }, [alianName]);
6006
6158
  const truncatedTitle = React.useMemo(() => {
6007
6159
  const name = account.alianName || "";
6008
- if (name.length > 20) {
6009
- return name.slice(0, 10) + "...";
6160
+ if (name.length > walletShared.MAX_ALIAS_NAME_LENGTH) {
6161
+ return name.slice(0, walletShared.MAX_ALIAS_NAME_LENGTH) + "...";
6010
6162
  }
6011
6163
  return name;
6012
6164
  }, [account.alianName]);
6013
6165
  const onInputChange = (e) => {
6014
6166
  const value = typeof e === "string" ? e : e.target.value;
6015
- if (value.length <= 20) {
6167
+ if (value.length <= walletShared.MAX_ALIAS_NAME_LENGTH) {
6016
6168
  setAlianName(value);
6017
6169
  }
6018
6170
  };
@@ -6103,7 +6255,11 @@ function useBRC20ListLogic() {
6103
6255
  if (currentAccount.address === "") {
6104
6256
  return { list: [], total: 0 };
6105
6257
  }
6106
- const { list, total: total2 } = await wallet.getBRC20List(currentAccount.address, page, pageSize);
6258
+ const { list, total: total2 } = await wallet.getBRC20List({
6259
+ address: currentAccount.address,
6260
+ currentPage: page,
6261
+ pageSize
6262
+ });
6107
6263
  if (list.length > 0) {
6108
6264
  wallet.getBrc20sPrice(list.map((item) => item.ticker)).then(updatePrices);
6109
6265
  }
@@ -6734,7 +6890,11 @@ function useBRC20ProgListLogic() {
6734
6890
  if (!supportedAssets.assets.brc20Prog || currentAccount.address === "") {
6735
6891
  return { list: [], total: 0 };
6736
6892
  }
6737
- const { list, total: total2 } = await wallet.getBRC20ProgList(currentAccount.address, page, pageSize);
6893
+ const { list, total: total2 } = await wallet.getBRC20ProgList({
6894
+ address: currentAccount.address,
6895
+ currentPage: page,
6896
+ pageSize
6897
+ });
6738
6898
  if (list.length > 0) {
6739
6899
  wallet.getBrc20sPrice(list.map((item) => item.ticker)).then(updatePrices);
6740
6900
  }
@@ -6886,6 +7046,9 @@ function useCAT20TokenScreenLogic() {
6886
7046
  const onClickTrade = (e) => {
6887
7047
  nav.navToUrl(marketPlaceUrl);
6888
7048
  };
7049
+ const onClickViewOnExplorer = (e) => {
7050
+ nav.navToUrl(tokenUrl);
7051
+ };
6889
7052
  const iconInfo = useCAT20IconInfo(tokenSummary.cat20Info.name, tokenSummary.cat20Info.tokenId);
6890
7053
  return {
6891
7054
  tokenSummary,
@@ -6898,6 +7061,7 @@ function useCAT20TokenScreenLogic() {
6898
7061
  onClickSend,
6899
7062
  onClickTrade,
6900
7063
  onClickBack,
7064
+ onClickViewOnExplorer,
6901
7065
  t
6902
7066
  };
6903
7067
  }
@@ -6914,15 +7078,25 @@ function useSplitOrdinalsInscriptionScreenLogic() {
6914
7078
  const account = useCurrentAccount();
6915
7079
  const minOutputValue = getAddressUtxoDust(account.address);
6916
7080
  const [outputValue, setOutputValue] = React.useState(defaultOutputValue);
7081
+ const [enableRBF, setEnableRBF] = React.useState(true);
6917
7082
  const { feeRate } = useFeeRateBar();
6918
7083
  const [inscriptions, setInscriptions] = React.useState([]);
6919
7084
  const [splitedCount, setSplitedCount] = React.useState(0);
6920
7085
  const wallet = useWallet();
7086
+ React.useEffect(() => {
7087
+ wallet.getEnableRBF().then((enableRBF2) => {
7088
+ setEnableRBF(enableRBF2);
7089
+ });
7090
+ }, [wallet]);
6921
7091
  React.useEffect(() => {
6922
7092
  wallet.getInscriptionUtxoDetail(props.inscription.inscriptionId).then((v) => {
6923
7093
  setInscriptions(v.inscriptions);
6924
7094
  });
6925
7095
  }, []);
7096
+ const onEnableRBFChange = (value) => {
7097
+ setEnableRBF(value);
7098
+ wallet.setEnableRBF(value);
7099
+ };
6926
7100
  React.useEffect(() => {
6927
7101
  setDisabled(true);
6928
7102
  setError("");
@@ -6947,7 +7121,7 @@ function useSplitOrdinalsInscriptionScreenLogic() {
6947
7121
  setOutputValue(value);
6948
7122
  };
6949
7123
  const onClickNext = () => {
6950
- createSplitTx({ inscriptionId: inscription.inscriptionId, feeRate, outputValue }).then((toSignData) => {
7124
+ createSplitTx({ inscriptionId: inscription.inscriptionId, feeRate, outputValue, enableRBF }).then((toSignData) => {
6951
7125
  nav.navigate("TxConfirmScreen", { toSignData });
6952
7126
  }).catch((e) => {
6953
7127
  console.log(e);
@@ -6959,6 +7133,8 @@ function useSplitOrdinalsInscriptionScreenLogic() {
6959
7133
  inscriptions,
6960
7134
  minOutputValue,
6961
7135
  splitedCount,
7136
+ enableRBF,
7137
+ setEnableRBF: onEnableRBFChange,
6962
7138
  error,
6963
7139
  disabled,
6964
7140
  onOutputValueChange,
@@ -7122,9 +7298,16 @@ function useSendAlkanesNFTScreenLogic() {
7122
7298
  inscription: void 0
7123
7299
  });
7124
7300
  const [error, setError] = React.useState("");
7301
+ const [enableRBF, setEnableRBF] = React.useState(true);
7125
7302
  useCurrentAccount();
7126
7303
  const tools = useTools();
7304
+ const wallet = useWallet();
7127
7305
  const { feeRate } = useFeeRateBar();
7306
+ React.useEffect(() => {
7307
+ wallet.getEnableRBF().then((enableRBF2) => {
7308
+ setEnableRBF(enableRBF2);
7309
+ });
7310
+ }, [wallet]);
7128
7311
  React.useEffect(() => {
7129
7312
  setError("");
7130
7313
  setDisabled(true);
@@ -7146,7 +7329,14 @@ function useSendAlkanesNFTScreenLogic() {
7146
7329
  const onCreateTxHandleConfirm = async () => {
7147
7330
  tools.showLoading(true);
7148
7331
  try {
7149
- const toSignData = await prepareSendAlkanes(toInfo, alkanesInfo.alkaneid, "1", feeRate, "nft");
7332
+ const toSignData = await prepareSendAlkanes(
7333
+ toInfo,
7334
+ alkanesInfo.alkaneid,
7335
+ "1",
7336
+ feeRate,
7337
+ "nft",
7338
+ enableRBF
7339
+ );
7150
7340
  if (toSignData) {
7151
7341
  transferData.current.toSignData = toSignData;
7152
7342
  setStep(1);
@@ -7187,14 +7377,20 @@ function useSendAlkanesNFTScreenLogic() {
7187
7377
  toSignDatas: [transferData.current.toSignData]
7188
7378
  }
7189
7379
  };
7380
+ const onEnableRBFChange = (value) => {
7381
+ setEnableRBF(value);
7382
+ wallet.setEnableRBF(value);
7383
+ };
7190
7384
  return {
7191
7385
  step,
7192
7386
  t,
7193
7387
  alkanesInfo,
7194
7388
  toInfo,
7389
+ enableRBF,
7195
7390
  disabled,
7196
7391
  error,
7197
7392
  setToInfo,
7393
+ setEnableRBF: onEnableRBFChange,
7198
7394
  onCreateTxHandleConfirm,
7199
7395
  onCreateTxHandleBack,
7200
7396
  onSignPsbtHandleConfirm,
@@ -7223,6 +7419,7 @@ function useSendAlkanesScreenLogic() {
7223
7419
  });
7224
7420
  const [availableBalance, setAvailableBalance] = React.useState(tokenBalance.amount);
7225
7421
  const [error, setError] = React.useState("");
7422
+ const [enableRBF, setEnableRBF] = React.useState(true);
7226
7423
  const totalBalanceStr = React.useMemo(() => {
7227
7424
  return baseUtils.bnUtils.toDecimalAmount(tokenBalance.amount, tokenBalance.divisibility);
7228
7425
  }, [tokenBalance]);
@@ -7271,6 +7468,11 @@ function useSendAlkanesScreenLogic() {
7271
7468
  });
7272
7469
  const [step, setStep] = React.useState(0 /* CREATE_TX */);
7273
7470
  const wallet = useWallet();
7471
+ React.useEffect(() => {
7472
+ wallet.getEnableRBF().then((enableRBF2) => {
7473
+ setEnableRBF(enableRBF2);
7474
+ });
7475
+ }, [wallet]);
7274
7476
  const prepareSendAlkanes = usePrepareSendAlkanesCallback();
7275
7477
  const pushBitcoinTx = usePushBitcoinTxCallback();
7276
7478
  const onClickBack = () => {
@@ -7284,7 +7486,8 @@ function useSendAlkanesScreenLogic() {
7284
7486
  tokenBalance.alkaneid,
7285
7487
  baseUtils.bnUtils.fromDecimalAmount(inputAmount, tokenBalance.divisibility),
7286
7488
  feeRate,
7287
- "ft"
7489
+ "ft",
7490
+ enableRBF
7288
7491
  );
7289
7492
  if (toSignData) {
7290
7493
  transferData.current.toSignData = toSignData;
@@ -7322,6 +7525,10 @@ function useSendAlkanesScreenLogic() {
7322
7525
  const onSignPsbtHandleBack = () => {
7323
7526
  setStep(0 /* CREATE_TX */);
7324
7527
  };
7528
+ const onEnableRBFChange = (value) => {
7529
+ setEnableRBF(value);
7530
+ wallet.setEnableRBF(value);
7531
+ };
7325
7532
  return {
7326
7533
  step,
7327
7534
  t,
@@ -7331,11 +7538,13 @@ function useSendAlkanesScreenLogic() {
7331
7538
  totalBalanceStr,
7332
7539
  availableBalanceStr,
7333
7540
  inputAmount,
7541
+ enableRBF,
7334
7542
  disabled,
7335
7543
  error,
7336
7544
  // actions
7337
7545
  setToInfo,
7338
7546
  setInputAmount,
7547
+ setEnableRBF: onEnableRBFChange,
7339
7548
  onClickBack,
7340
7549
  onClickNext,
7341
7550
  // sign psbt actions
@@ -8543,6 +8752,7 @@ exports.BRC20TokenScreenTabKey = BRC20TokenScreenTabKey;
8543
8752
  exports.CATAssetTabKey = CATAssetTabKey;
8544
8753
  exports.DeviceContext = DeviceContext;
8545
8754
  exports.I18nContext = I18nContext;
8755
+ exports.MoreAssetTabKey = MoreAssetTabKey;
8546
8756
  exports.NavigationContext = NavigationContext;
8547
8757
  exports.NavigationSource = NavigationSource;
8548
8758
  exports.OrdinalsAssetTabKey = OrdinalsAssetTabKey;
@@ -8586,6 +8796,7 @@ exports.useAlkanesListLogic = useAlkanesListLogic;
8586
8796
  exports.useAlkanesMarketPlaceWebsite = useAlkanesMarketPlaceWebsite;
8587
8797
  exports.useAlkanesNFTListLogic = useAlkanesNFTListLogic;
8588
8798
  exports.useAlkanesNFTScreenLogic = useAlkanesNFTScreenLogic;
8799
+ exports.useAlkanesTokenInfoExplorerUrl = useAlkanesTokenInfoExplorerUrl;
8589
8800
  exports.useAlkanesTokenScreenLogic = useAlkanesTokenScreenLogic;
8590
8801
  exports.useAmountInput = useAmountInput;
8591
8802
  exports.useAmountInputLogic = useAmountInputLogic;
@@ -8697,6 +8908,7 @@ exports.useLockCallback = useLockCallback;
8697
8908
  exports.useLockTimePageLogic = useLockTimePageLogic;
8698
8909
  exports.useLockedOverlayVisible = useLockedOverlayVisible;
8699
8910
  exports.useModelPopover = useModelPopover;
8911
+ exports.useMoreAssetTabKey = useMoreAssetTabKey;
8700
8912
  exports.useNavigation = useNavigation;
8701
8913
  exports.useNetworkType = useNetworkType;
8702
8914
  exports.useNotificationsLogic = useNotificationsLogic;
@@ -8726,6 +8938,7 @@ exports.useRunesIconInfo = useRunesIconInfo;
8726
8938
  exports.useRunesInscribeUrl = useRunesInscribeUrl;
8727
8939
  exports.useRunesListLogic = useRunesListLogic;
8728
8940
  exports.useRunesMarketUrl = useRunesMarketUrl;
8941
+ exports.useRunesTokenInfoExplorerUrl = useRunesTokenInfoExplorerUrl;
8729
8942
  exports.useRunesTokenScreenLogic = useRunesTokenScreenLogic;
8730
8943
  exports.useRunesTx = useRunesTx;
8731
8944
  exports.useSafeBalance = useSafeBalance;