@0xsquid/react-hooks 8.11.1-beta-danal.0 → 8.11.1-beta-danal.1
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.
- package/dist/hooks/store/useDepositAddressStore.d.ts +6 -0
- package/dist/hooks/swap/useDepositAddress.d.ts +2 -0
- package/dist/{index-COYrDBlh.js → index-BT6G_mgr.js} +22 -6
- package/dist/{index-Bz_l0J0g.js.map → index-BT6G_mgr.js.map} +1 -1
- package/dist/{index-Bz_l0J0g.js → index-D6rznmR_.js} +20 -7
- package/dist/{index-COYrDBlh.js.map → index-D6rznmR_.js.map} +1 -1
- package/dist/{index.es-Bh80Pkl-.js → index.es-BZb8tg2z.js} +2 -2
- package/dist/{index.es-Bh80Pkl-.js.map → index.es-BZb8tg2z.js.map} +1 -1
- package/dist/{index.es-Cqc-vgYs.js → index.es-Dl19u5sy.js} +2 -2
- package/dist/{index.es-Cqc-vgYs.js.map → index.es-Dl19u5sy.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/{secretService-uItv_3Jq.js → secretService-Dvc9Dg4U.js} +2 -2
- package/dist/{secretService-uItv_3Jq.js.map → secretService-Dvc9Dg4U.js.map} +1 -1
- package/dist/{secretService-SFoJwk5s.js → secretService-TP5V9Jwg.js} +2 -2
- package/dist/{secretService-SFoJwk5s.js.map → secretService-TP5V9Jwg.js.map} +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/internal/danalService.d.ts +1 -0
- package/dist/{stellarService.client-C-DwcHfr.js → stellarService.client-WTkVJJhn.js} +2 -2
- package/dist/{stellarService.client-C-DwcHfr.js.map → stellarService.client-WTkVJJhn.js.map} +1 -1
- package/dist/{stellarService.client-rTXJcduV.js → stellarService.client-c48cnGgL.js} +2 -2
- package/dist/{stellarService.client-rTXJcduV.js.map → stellarService.client-c48cnGgL.js.map} +1 -1
- package/package.json +1 -1
|
@@ -15,8 +15,14 @@ export type PaymentMethod = "connectedWallet" | "depositAddress";
|
|
|
15
15
|
interface DepositAddressStore {
|
|
16
16
|
deposit: DepositData | null;
|
|
17
17
|
selectedPaymentMethod: PaymentMethod;
|
|
18
|
+
/**
|
|
19
|
+
* Deposit transaction hash entered manually by the user, for chains where
|
|
20
|
+
* the app cannot obtain it (e.g. Danal). Used as transactionId for /status
|
|
21
|
+
*/
|
|
22
|
+
userDepositTxId: string | null;
|
|
18
23
|
setDeposit(data: DepositData | null): void;
|
|
19
24
|
setPaymentMethod(method: PaymentMethod): void;
|
|
25
|
+
setUserDepositTxId(txId: string | null): void;
|
|
20
26
|
}
|
|
21
27
|
export declare const useDepositAddressStore: import("zustand").UseBoundStore<import("zustand").StoreApi<DepositAddressStore>>;
|
|
22
28
|
export {};
|
|
@@ -12,4 +12,6 @@ export declare function useDepositAddress(squidRoute?: RouteResponse["route"]):
|
|
|
12
12
|
depositAddress: string | undefined;
|
|
13
13
|
closeDepositChannel: () => void;
|
|
14
14
|
depositData: import("../store/useDepositAddressStore").DepositData | null;
|
|
15
|
+
userDepositTxId: string | null;
|
|
16
|
+
setUserDepositTxId: (txId: string | null) => void;
|
|
15
17
|
};
|
|
@@ -21139,6 +21139,13 @@ function isDanalAddressValid(address) {
|
|
|
21139
21139
|
return false;
|
|
21140
21140
|
return DANAL_ADDRESS_REGEX.test(address);
|
|
21141
21141
|
}
|
|
21142
|
+
// Fabric transaction id: 64 hex chars, no 0x prefix
|
|
21143
|
+
const DANAL_TX_HASH_REGEX = /^[0-9a-fA-F]{64}$/;
|
|
21144
|
+
function isDanalTxHashValid(hash) {
|
|
21145
|
+
if (!hash)
|
|
21146
|
+
return false;
|
|
21147
|
+
return DANAL_TX_HASH_REGEX.test(hash);
|
|
21148
|
+
}
|
|
21142
21149
|
function isDanalTransferRequestBody(value) {
|
|
21143
21150
|
if (typeof value !== "object" || value === null)
|
|
21144
21151
|
return false;
|
|
@@ -23728,7 +23735,7 @@ const filterViewableTokens = (tokens, config, direction) => {
|
|
|
23728
23735
|
};
|
|
23729
23736
|
const getSecretNetworkBalances = async (chainData, cosmosAddress, squidTokens, keplrTypeWallet) => {
|
|
23730
23737
|
const squidSecretTokens = squidTokens.filter((t) => t.chainId === CHAIN_IDS.SECRET);
|
|
23731
|
-
const { fetchAllSecretBalances } = await Promise.resolve().then(function () { return require('./secretService-
|
|
23738
|
+
const { fetchAllSecretBalances } = await Promise.resolve().then(function () { return require('./secretService-TP5V9Jwg.js'); });
|
|
23732
23739
|
return fetchAllSecretBalances(chainData, cosmosAddress, squidSecretTokens, keplrTypeWallet);
|
|
23733
23740
|
};
|
|
23734
23741
|
function getTokenAssetsKey(token) {
|
|
@@ -27487,7 +27494,7 @@ function useStellarWallets() {
|
|
|
27487
27494
|
try {
|
|
27488
27495
|
const { allowAllModules: initializeAllModules } = await import('@creit.tech/stellar-wallets-kit');
|
|
27489
27496
|
const { LedgerModule } = await import('@creit.tech/stellar-wallets-kit/modules/ledger.module.mjs');
|
|
27490
|
-
const { formatStellarWallet } = await Promise.resolve().then(function () { return require('./stellarService.client-
|
|
27497
|
+
const { formatStellarWallet } = await Promise.resolve().then(function () { return require('./stellarService.client-WTkVJJhn.js'); });
|
|
27491
27498
|
const modules = [...initializeAllModules(), new LedgerModule()];
|
|
27492
27499
|
const promises = modules.map(async (module) => {
|
|
27493
27500
|
const isAvailable = await module.isAvailable();
|
|
@@ -30957,7 +30964,7 @@ function hederaWalletConnect(parameters) {
|
|
|
30957
30964
|
const optionalChains = config.chains.map((x) => x.id);
|
|
30958
30965
|
if (!optionalChains.length)
|
|
30959
30966
|
return;
|
|
30960
|
-
const { EthereumProvider } = await Promise.resolve().then(function () { return require('./index.es-
|
|
30967
|
+
const { EthereumProvider } = await Promise.resolve().then(function () { return require('./index.es-BZb8tg2z.js'); });
|
|
30961
30968
|
const rawProvider = await EthereumProvider.init({
|
|
30962
30969
|
...restParameters,
|
|
30963
30970
|
disableProviderPing: true,
|
|
@@ -31645,8 +31652,12 @@ const useSendTransactionStore = zustand.create((set, get) => ({
|
|
|
31645
31652
|
const useDepositAddressStore = zustand.create((set) => ({
|
|
31646
31653
|
deposit: null,
|
|
31647
31654
|
selectedPaymentMethod: "connectedWallet",
|
|
31655
|
+
userDepositTxId: null,
|
|
31648
31656
|
setDeposit: (data) => {
|
|
31649
|
-
set({ deposit: data });
|
|
31657
|
+
set({ deposit: data, userDepositTxId: null });
|
|
31658
|
+
},
|
|
31659
|
+
setUserDepositTxId: (txId) => {
|
|
31660
|
+
set({ userDepositTxId: txId });
|
|
31650
31661
|
},
|
|
31651
31662
|
setPaymentMethod: (method) => {
|
|
31652
31663
|
set({ selectedPaymentMethod: method });
|
|
@@ -31658,7 +31669,7 @@ function useDepositAddress(squidRoute) {
|
|
|
31658
31669
|
selectedPaymentMethod: state.selectedPaymentMethod,
|
|
31659
31670
|
depositAddress: state.deposit?.depositAddress,
|
|
31660
31671
|
}));
|
|
31661
|
-
const { setDeposit, setPaymentMethod, deposit } = useDepositAddressStore();
|
|
31672
|
+
const { setDeposit, setPaymentMethod, deposit, userDepositTxId, setUserDepositTxId, } = useDepositAddressStore();
|
|
31662
31673
|
const { squid } = useSquidStore();
|
|
31663
31674
|
const { fromChain } = useSwap();
|
|
31664
31675
|
const isAvailableAsPaymentMethod = React.useMemo(() => {
|
|
@@ -31735,6 +31746,8 @@ function useDepositAddress(squidRoute) {
|
|
|
31735
31746
|
depositAddress,
|
|
31736
31747
|
closeDepositChannel,
|
|
31737
31748
|
depositData: deposit,
|
|
31749
|
+
userDepositTxId,
|
|
31750
|
+
setUserDepositTxId,
|
|
31738
31751
|
};
|
|
31739
31752
|
}
|
|
31740
31753
|
|
|
@@ -39073,7 +39086,9 @@ exports.isChainflipBridgeTransaction = isChainflipBridgeTransaction;
|
|
|
39073
39086
|
exports.isChainflipDepositRoute = isChainflipDepositRoute;
|
|
39074
39087
|
exports.isCoralBridgeAction = isCoralBridgeAction;
|
|
39075
39088
|
exports.isCosmosAddressValid = isCosmosAddressValid;
|
|
39089
|
+
exports.isDanalAddressValid = isDanalAddressValid;
|
|
39076
39090
|
exports.isDanalDepositRoute = isDanalDepositRoute;
|
|
39091
|
+
exports.isDanalTxHashValid = isDanalTxHashValid;
|
|
39077
39092
|
exports.isDepositAddressDirectTransferRoute = isDepositAddressDirectTransferRoute;
|
|
39078
39093
|
exports.isEmptyObject = isEmptyObject;
|
|
39079
39094
|
exports.isEvmChainNotSupportedError = isEvmChainNotSupportedError;
|
|
@@ -39111,6 +39126,7 @@ exports.nativeXrplTokenAddress = nativeXrplTokenAddress;
|
|
|
39111
39126
|
exports.normalizeError = normalizeError;
|
|
39112
39127
|
exports.normalizeIbcAddress = normalizeIbcAddress;
|
|
39113
39128
|
exports.normalizeTokenSymbol = normalizeTokenSymbol;
|
|
39129
|
+
exports.parseDanalTransferBody = parseDanalTransferBody;
|
|
39114
39130
|
exports.parseEvmAddress = parseEvmAddress;
|
|
39115
39131
|
exports.parseInitialAssetsFromUrl = parseInitialAssetsFromUrl;
|
|
39116
39132
|
exports.parseToBigInt = parseToBigInt;
|
|
@@ -39223,4 +39239,4 @@ exports.useXrplTrustLine = useXrplTrustLine;
|
|
|
39223
39239
|
exports.waitForReceiptWithRetry = waitForReceiptWithRetry;
|
|
39224
39240
|
exports.walletIconBaseUrl = walletIconBaseUrl;
|
|
39225
39241
|
exports.walletSupportsChainType = walletSupportsChainType;
|
|
39226
|
-
//# sourceMappingURL=index-
|
|
39242
|
+
//# sourceMappingURL=index-BT6G_mgr.js.map
|