@turnkey/react-wallet-kit 1.8.1 → 1.10.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.
- package/dist/components/auth/OTP.mjs +1 -1
- package/dist/components/design/Lottie/Wrapper.mjs +1 -1
- package/dist/components/send-transaction/helpers.d.ts.map +1 -1
- package/dist/components/send-transaction/helpers.js +7 -1
- package/dist/components/send-transaction/helpers.js.map +1 -1
- package/dist/components/send-transaction/helpers.mjs +7 -1
- package/dist/components/send-transaction/helpers.mjs.map +1 -1
- package/dist/providers/client/Provider.d.ts.map +1 -1
- package/dist/providers/client/Provider.js +114 -47
- package/dist/providers/client/Provider.js.map +1 -1
- package/dist/providers/client/Provider.mjs +1088 -931
- package/dist/providers/client/Provider.mjs.map +1 -1
- package/dist/providers/client/Types.d.ts +40 -22
- package/dist/providers/client/Types.d.ts.map +1 -1
- package/dist/providers/client/Types.js.map +1 -1
- package/dist/providers/client/Types.mjs.map +1 -1
- package/dist/providers/modal/Provider.mjs +1 -1
- package/dist/typedoc-entry/index.d.ts +1 -0
- package/dist/typedoc-entry/index.d.ts.map +1 -1
- package/dist/types/method-types.d.ts +9 -2
- package/dist/types/method-types.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray,
|
|
1
|
+
import { slicedToArray as _slicedToArray, toConsumableArray as _toConsumableArray, asyncToGenerator as _asyncToGenerator, regenerator as _regenerator, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.mjs';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useRef } from 'react';
|
|
4
4
|
import { useModal } from '../../providers/modal/Hook.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray,
|
|
1
|
+
import { slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../../../_virtual/_rollupPluginBabelHelpers.mjs';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/send-transaction/helpers.tsx"],"names":[],"mappings":";AAEA,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/send-transaction/helpers.tsx"],"names":[],"mappings":";AAEA,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAuBpE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAI3D"}
|
|
@@ -5,6 +5,12 @@ var Svg = require('../design/Svg.js');
|
|
|
5
5
|
|
|
6
6
|
function getExplorerUrl(txHash, caip2) {
|
|
7
7
|
switch (caip2) {
|
|
8
|
+
case "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":
|
|
9
|
+
return `https://solscan.io/tx/${txHash}`;
|
|
10
|
+
case "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG":
|
|
11
|
+
return `https://solscan.io/tx/${txHash}?cluster=devnet`;
|
|
12
|
+
case "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY":
|
|
13
|
+
return `https://solscan.io/tx/${txHash}?cluster=testnet`;
|
|
8
14
|
case "eip155:8453":
|
|
9
15
|
return `https://basescan.org/tx/${txHash}`;
|
|
10
16
|
case "eip155:84532":
|
|
@@ -16,7 +22,7 @@ function getExplorerUrl(txHash, caip2) {
|
|
|
16
22
|
case "eip155:137":
|
|
17
23
|
return `https://polygonscan.com/tx/${txHash}`;
|
|
18
24
|
default:
|
|
19
|
-
return `https://etherscan.io/tx/${txHash}`;
|
|
25
|
+
return caip2.startsWith("solana:") ? `https://solscan.io/tx/${txHash}` : `https://etherscan.io/tx/${txHash}`;
|
|
20
26
|
}
|
|
21
27
|
}
|
|
22
28
|
function getChainLogo(caip2) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../src/components/send-transaction/helpers.tsx"],"sourcesContent":[null],"names":["getExplorerUrl","txHash","caip2","
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../src/components/send-transaction/helpers.tsx"],"sourcesContent":[null],"names":["getExplorerUrl","txHash","caip2","startsWith","getChainLogo","Logo","SolanaLogo","EthereumLogo","_jsx","className"],"mappings":";;;;;AAEM,SAAUA,cAAcA,CAACC,MAAc,EAAEC,KAAa,EAAA;AAC1D,EAAA,QAAQA,KAAK;AACX,IAAA,KAAK,yCAAyC;MAC5C,OAAO,CAAA,sBAAA,EAAyBD,MAAM,CAAA,CAAE;AAC1C,IAAA,KAAK,qDAAqD;MACxD,OAAO,CAAA,sBAAA,EAAyBA,MAAM,CAAA,eAAA,CAAiB;AACzD,IAAA,KAAK,qDAAqD;MACxD,OAAO,CAAA,sBAAA,EAAyBA,MAAM,CAAA,gBAAA,CAAkB;AAC1D,IAAA,KAAK,aAAa;MAChB,OAAO,CAAA,wBAAA,EAA2BA,MAAM,CAAA,CAAE;AAC5C,IAAA,KAAK,cAAc;MACjB,OAAO,CAAA,gCAAA,EAAmCA,MAAM,CAAA,CAAE;AACpD,IAAA,KAAK,UAAU;MACb,OAAO,CAAA,wBAAA,EAA2BA,MAAM,CAAA,CAAE;AAC5C,IAAA,KAAK,iBAAiB;MACpB,OAAO,CAAA,gCAAA,EAAmCA,MAAM,CAAA,CAAE;AACpD,IAAA,KAAK,YAAY;MACf,OAAO,CAAA,2BAAA,EAA8BA,MAAM,CAAA,CAAE;AAC/C,IAAA;AACE,MAAA,OAAOC,KAAK,CAACC,UAAU,CAAC,SAAS,CAAC,GAC9B,CAAA,sBAAA,EAAyBF,MAAM,CAAA,CAAE,GACjC,CAAA,wBAAA,EAA2BA,MAAM,CAAA,CAAE;AAC3C;AACF;AAEM,SAAUG,YAAYA,CAACF,KAAa,EAAA;EACxC,MAAMG,IAAI,GAAGH,KAAK,CAACC,UAAU,CAAC,SAAS,CAAC,GAAGG,cAAU,GAAGC,gBAAY;EAEpE,OAAOC,eAACH,IAAI,EAAA;AAACI,IAAAA,SAAS,EAAC;IAA2B;AACpD;;;;;"}
|
|
@@ -3,6 +3,12 @@ import { SolanaLogo, EthereumLogo } from '../design/Svg.mjs';
|
|
|
3
3
|
|
|
4
4
|
function getExplorerUrl(txHash, caip2) {
|
|
5
5
|
switch (caip2) {
|
|
6
|
+
case "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":
|
|
7
|
+
return "https://solscan.io/tx/".concat(txHash);
|
|
8
|
+
case "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG":
|
|
9
|
+
return "https://solscan.io/tx/".concat(txHash, "?cluster=devnet");
|
|
10
|
+
case "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY":
|
|
11
|
+
return "https://solscan.io/tx/".concat(txHash, "?cluster=testnet");
|
|
6
12
|
case "eip155:8453":
|
|
7
13
|
return "https://basescan.org/tx/".concat(txHash);
|
|
8
14
|
case "eip155:84532":
|
|
@@ -14,7 +20,7 @@ function getExplorerUrl(txHash, caip2) {
|
|
|
14
20
|
case "eip155:137":
|
|
15
21
|
return "https://polygonscan.com/tx/".concat(txHash);
|
|
16
22
|
default:
|
|
17
|
-
return "https://etherscan.io/tx/".concat(txHash);
|
|
23
|
+
return caip2.startsWith("solana:") ? "https://solscan.io/tx/".concat(txHash) : "https://etherscan.io/tx/".concat(txHash);
|
|
18
24
|
}
|
|
19
25
|
}
|
|
20
26
|
function getChainLogo(caip2) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.mjs","sources":["../../../src/components/send-transaction/helpers.tsx"],"sourcesContent":[null],"names":["getExplorerUrl","txHash","caip2","concat","
|
|
1
|
+
{"version":3,"file":"helpers.mjs","sources":["../../../src/components/send-transaction/helpers.tsx"],"sourcesContent":[null],"names":["getExplorerUrl","txHash","caip2","concat","startsWith","getChainLogo","Logo","SolanaLogo","EthereumLogo","_jsx","className"],"mappings":";;;AAEM,SAAUA,cAAcA,CAACC,MAAc,EAAEC,KAAa,EAAA;AAC1D,EAAA,QAAQA,KAAK;AACX,IAAA,KAAK,yCAAyC;MAC5C,OAAA,wBAAA,CAAAC,MAAA,CAAgCF,MAAM,CAAA;AACxC,IAAA,KAAK,qDAAqD;MACxD,OAAA,wBAAA,CAAAE,MAAA,CAAgCF,MAAM,EAAA,iBAAA,CAAA;AACxC,IAAA,KAAK,qDAAqD;MACxD,OAAA,wBAAA,CAAAE,MAAA,CAAgCF,MAAM,EAAA,kBAAA,CAAA;AACxC,IAAA,KAAK,aAAa;MAChB,OAAA,0BAAA,CAAAE,MAAA,CAAkCF,MAAM,CAAA;AAC1C,IAAA,KAAK,cAAc;MACjB,OAAA,kCAAA,CAAAE,MAAA,CAA0CF,MAAM,CAAA;AAClD,IAAA,KAAK,UAAU;MACb,OAAA,0BAAA,CAAAE,MAAA,CAAkCF,MAAM,CAAA;AAC1C,IAAA,KAAK,iBAAiB;MACpB,OAAA,kCAAA,CAAAE,MAAA,CAA0CF,MAAM,CAAA;AAClD,IAAA,KAAK,YAAY;MACf,OAAA,6BAAA,CAAAE,MAAA,CAAqCF,MAAM,CAAA;AAC7C,IAAA;AACE,MAAA,OAAOC,KAAK,CAACE,UAAU,CAAC,SAAS,CAAC,GAAA,wBAAA,CAAAD,MAAA,CACLF,MAAM,CAAA,GAAA,0BAAA,CAAAE,MAAA,CACJF,MAAM,CAAE;AAC3C;AACF;AAEM,SAAUI,YAAYA,CAACH,KAAa,EAAA;EACxC,IAAMI,IAAI,GAAGJ,KAAK,CAACE,UAAU,CAAC,SAAS,CAAC,GAAGG,UAAU,GAAGC,YAAY;EAEpE,OAAOC,IAACH,IAAI,EAAA;AAACI,IAAAA,SAAS,EAAC;IAA2B;AACpD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/providers/client/Provider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/providers/client/Provider.tsx"],"names":[],"mappings":"AAwHA,OAAO,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAC;AAwB5E,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAM3B,MAAM,kBAAkB,CAAC;AAwD1B;;GAEG;AACH,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,SAAS,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqoLxD,CAAC"}
|
|
@@ -1484,6 +1484,14 @@ const ClientProvider = ({
|
|
|
1484
1484
|
if (!client) throw new sdkTypes.TurnkeyError("Client is not initialized.", sdkTypes.TurnkeyErrorCodes.CLIENT_NOT_INITIALIZED);
|
|
1485
1485
|
return utils.withTurnkeyErrorHandling(() => client.ethSendTransaction(params), () => logout(), callbacks, "Failed to send eth transaction");
|
|
1486
1486
|
}, [client, callbacks, logout]);
|
|
1487
|
+
const ethSendErc20Transfer = react.useCallback(async params => {
|
|
1488
|
+
if (!client) throw new sdkTypes.TurnkeyError("Client is not initialized.", sdkTypes.TurnkeyErrorCodes.CLIENT_NOT_INITIALIZED);
|
|
1489
|
+
return utils.withTurnkeyErrorHandling(() => client.ethSendErc20Transfer(params), () => logout(), callbacks, "Failed to send ERC20 transfer");
|
|
1490
|
+
}, [client, callbacks, logout]);
|
|
1491
|
+
const solSendTransaction = react.useCallback(async params => {
|
|
1492
|
+
if (!client) throw new sdkTypes.TurnkeyError("Client is not initialized.", sdkTypes.TurnkeyErrorCodes.CLIENT_NOT_INITIALIZED);
|
|
1493
|
+
return utils.withTurnkeyErrorHandling(() => client.solSendTransaction(params), () => logout(), callbacks, "Failed to send sol transaction");
|
|
1494
|
+
}, [client, callbacks, logout]);
|
|
1487
1495
|
const signAndSendTransaction = react.useCallback(async params => {
|
|
1488
1496
|
if (!client) throw new sdkTypes.TurnkeyError("Client is not initialized.", sdkTypes.TurnkeyErrorCodes.CLIENT_NOT_INITIALIZED);
|
|
1489
1497
|
return utils.withTurnkeyErrorHandling(() => client.signAndSendTransaction(params), () => logout(), callbacks, "Failed to sign and send transaction");
|
|
@@ -3349,63 +3357,69 @@ const ClientProvider = ({
|
|
|
3349
3357
|
successPageDuration = 2000
|
|
3350
3358
|
} = params;
|
|
3351
3359
|
const {
|
|
3352
|
-
|
|
3353
|
-
to,
|
|
3354
|
-
caip2,
|
|
3355
|
-
value,
|
|
3356
|
-
data,
|
|
3357
|
-
nonce,
|
|
3358
|
-
gasLimit,
|
|
3359
|
-
maxFeePerGas,
|
|
3360
|
-
maxPriorityFeePerGas,
|
|
3361
|
-
sponsor
|
|
3360
|
+
caip2
|
|
3362
3361
|
} = transaction;
|
|
3363
|
-
const
|
|
3362
|
+
const isSolanaTransaction = caip2.startsWith("solana:");
|
|
3364
3363
|
return new Promise((resolve, reject) => {
|
|
3365
3364
|
const action = async () => {
|
|
3366
|
-
const
|
|
3367
|
-
from,
|
|
3368
|
-
to,
|
|
3369
|
-
caip2,
|
|
3370
|
-
sponsor: sponsor ?? false,
|
|
3371
|
-
...(value ? {
|
|
3372
|
-
value
|
|
3373
|
-
} : {}),
|
|
3374
|
-
...(cleanedData ? {
|
|
3375
|
-
data: cleanedData
|
|
3376
|
-
} : {}),
|
|
3377
|
-
...(nonce ? {
|
|
3378
|
-
nonce
|
|
3379
|
-
} : {}),
|
|
3380
|
-
...(gasLimit ? {
|
|
3381
|
-
gasLimit
|
|
3382
|
-
} : {}),
|
|
3383
|
-
...(maxFeePerGas ? {
|
|
3384
|
-
maxFeePerGas
|
|
3385
|
-
} : {}),
|
|
3386
|
-
...(maxPriorityFeePerGas ? {
|
|
3387
|
-
maxPriorityFeePerGas
|
|
3388
|
-
} : {})
|
|
3389
|
-
};
|
|
3390
|
-
const sendTransactionStatusId = await ethSendTransaction({
|
|
3365
|
+
const sendTransactionStatusId = isSolanaTransaction ? await solSendTransaction({
|
|
3391
3366
|
organizationId,
|
|
3392
|
-
transaction:
|
|
3367
|
+
transaction: transaction,
|
|
3393
3368
|
stampWith
|
|
3394
|
-
})
|
|
3369
|
+
}) : await (async () => {
|
|
3370
|
+
const {
|
|
3371
|
+
from,
|
|
3372
|
+
to,
|
|
3373
|
+
value,
|
|
3374
|
+
data,
|
|
3375
|
+
nonce,
|
|
3376
|
+
gasLimit,
|
|
3377
|
+
maxFeePerGas,
|
|
3378
|
+
maxPriorityFeePerGas,
|
|
3379
|
+
sponsor
|
|
3380
|
+
} = transaction;
|
|
3381
|
+
const cleanedData = data && data !== "0x" && data !== "" ? data : undefined;
|
|
3382
|
+
const tx = {
|
|
3383
|
+
from,
|
|
3384
|
+
to,
|
|
3385
|
+
caip2,
|
|
3386
|
+
sponsor: sponsor ?? false,
|
|
3387
|
+
...(value ? {
|
|
3388
|
+
value
|
|
3389
|
+
} : {}),
|
|
3390
|
+
...(cleanedData ? {
|
|
3391
|
+
data: cleanedData
|
|
3392
|
+
} : {}),
|
|
3393
|
+
...(nonce ? {
|
|
3394
|
+
nonce
|
|
3395
|
+
} : {}),
|
|
3396
|
+
...(gasLimit ? {
|
|
3397
|
+
gasLimit
|
|
3398
|
+
} : {}),
|
|
3399
|
+
...(maxFeePerGas ? {
|
|
3400
|
+
maxFeePerGas
|
|
3401
|
+
} : {}),
|
|
3402
|
+
...(maxPriorityFeePerGas ? {
|
|
3403
|
+
maxPriorityFeePerGas
|
|
3404
|
+
} : {})
|
|
3405
|
+
};
|
|
3406
|
+
return ethSendTransaction({
|
|
3407
|
+
organizationId,
|
|
3408
|
+
transaction: tx,
|
|
3409
|
+
stampWith
|
|
3410
|
+
});
|
|
3411
|
+
})();
|
|
3395
3412
|
if (!sendTransactionStatusId) {
|
|
3396
|
-
throw new sdkTypes.TurnkeyError("Missing sendTransactionStatusId", sdkTypes.TurnkeyErrorCodes.
|
|
3413
|
+
throw new sdkTypes.TurnkeyError("Missing sendTransactionStatusId", sdkTypes.TurnkeyErrorCodes.BAD_RESPONSE);
|
|
3397
3414
|
}
|
|
3398
3415
|
const pollResult = await pollTransactionStatus({
|
|
3399
3416
|
organizationId,
|
|
3400
3417
|
sendTransactionStatusId
|
|
3401
3418
|
});
|
|
3402
|
-
const txHash = pollResult?.eth?.txHash;
|
|
3403
|
-
|
|
3404
|
-
throw new sdkTypes.TurnkeyError("Missing txHash in transaction result", sdkTypes.TurnkeyErrorCodes.POLL_TRANSACTION_STATUS_ERROR);
|
|
3405
|
-
}
|
|
3406
|
-
return {
|
|
3419
|
+
const txHash = pollResult?.eth?.txHash ?? pollResult?.txHash;
|
|
3420
|
+
return txHash ? {
|
|
3407
3421
|
txHash
|
|
3408
|
-
};
|
|
3422
|
+
} : {};
|
|
3409
3423
|
};
|
|
3410
3424
|
pushPage({
|
|
3411
3425
|
key: "Send Transaction",
|
|
@@ -3422,7 +3436,57 @@ const ClientProvider = ({
|
|
|
3422
3436
|
})
|
|
3423
3437
|
});
|
|
3424
3438
|
});
|
|
3425
|
-
}, [pushPage,
|
|
3439
|
+
}, [ethSendTransaction, getSession, pollTransactionStatus, pushPage, solSendTransaction]);
|
|
3440
|
+
const handleSendErc20Transfer = react.useCallback(async params => {
|
|
3441
|
+
const session = await getSession();
|
|
3442
|
+
const organizationId = params.organizationId || session?.organizationId;
|
|
3443
|
+
if (!organizationId) {
|
|
3444
|
+
throw new sdkTypes.TurnkeyError("A session or passed in organization ID is required.", sdkTypes.TurnkeyErrorCodes.INVALID_REQUEST);
|
|
3445
|
+
}
|
|
3446
|
+
const {
|
|
3447
|
+
transfer,
|
|
3448
|
+
icon,
|
|
3449
|
+
stampWith,
|
|
3450
|
+
successPageDuration = 2000
|
|
3451
|
+
} = params;
|
|
3452
|
+
const {
|
|
3453
|
+
caip2
|
|
3454
|
+
} = transfer;
|
|
3455
|
+
return new Promise((resolve, reject) => {
|
|
3456
|
+
const action = async () => {
|
|
3457
|
+
const sendTransactionStatusId = await ethSendErc20Transfer({
|
|
3458
|
+
organizationId,
|
|
3459
|
+
transfer,
|
|
3460
|
+
stampWith
|
|
3461
|
+
});
|
|
3462
|
+
if (!sendTransactionStatusId) {
|
|
3463
|
+
throw new sdkTypes.TurnkeyError("Missing sendTransactionStatusId", sdkTypes.TurnkeyErrorCodes.BAD_RESPONSE);
|
|
3464
|
+
}
|
|
3465
|
+
const pollResult = await pollTransactionStatus({
|
|
3466
|
+
organizationId,
|
|
3467
|
+
sendTransactionStatusId
|
|
3468
|
+
});
|
|
3469
|
+
const txHash = pollResult?.eth?.txHash ?? pollResult?.txHash;
|
|
3470
|
+
return txHash ? {
|
|
3471
|
+
txHash
|
|
3472
|
+
} : {};
|
|
3473
|
+
};
|
|
3474
|
+
pushPage({
|
|
3475
|
+
key: "Send ERC20 Transfer",
|
|
3476
|
+
showTitle: false,
|
|
3477
|
+
preventBack: true,
|
|
3478
|
+
onClose: () => reject(new sdkTypes.TurnkeyError("User canceled the transaction.", sdkTypes.TurnkeyErrorCodes.USER_CANCELED)),
|
|
3479
|
+
content: jsxRuntime.jsx(SendTransaction.SendTransactionPage, {
|
|
3480
|
+
icon: icon ?? helpers.getChainLogo(caip2),
|
|
3481
|
+
action: action,
|
|
3482
|
+
caip2: caip2,
|
|
3483
|
+
successPageDuration: successPageDuration,
|
|
3484
|
+
onSuccess: () => resolve(),
|
|
3485
|
+
onError: err => reject(err)
|
|
3486
|
+
})
|
|
3487
|
+
});
|
|
3488
|
+
});
|
|
3489
|
+
}, [ethSendErc20Transfer, getSession, pollTransactionStatus, pushPage]);
|
|
3426
3490
|
const handleOnRamp = react.useCallback(async params => {
|
|
3427
3491
|
const {
|
|
3428
3492
|
walletAccount,
|
|
@@ -3777,6 +3841,8 @@ const ClientProvider = ({
|
|
|
3777
3841
|
signMessage,
|
|
3778
3842
|
signTransaction,
|
|
3779
3843
|
ethSendTransaction,
|
|
3844
|
+
ethSendErc20Transfer,
|
|
3845
|
+
solSendTransaction,
|
|
3780
3846
|
signAndSendTransaction,
|
|
3781
3847
|
pollTransactionStatus,
|
|
3782
3848
|
fetchUser,
|
|
@@ -3839,7 +3905,8 @@ const ClientProvider = ({
|
|
|
3839
3905
|
handleRemoveUserPhoneNumber,
|
|
3840
3906
|
handleVerifyAppProofs,
|
|
3841
3907
|
handleOnRamp,
|
|
3842
|
-
handleSendTransaction
|
|
3908
|
+
handleSendTransaction,
|
|
3909
|
+
handleSendErc20Transfer
|
|
3843
3910
|
},
|
|
3844
3911
|
children: children
|
|
3845
3912
|
});
|