@web3auth/no-modal 10.9.0 → 10.11.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/lib.cjs/base/connector/baseConnector.js +9 -5
- package/dist/lib.cjs/base/connector/connectorStatus.js +9 -0
- package/dist/lib.cjs/base/connector/constants.js +8 -1
- package/dist/lib.cjs/base/plugin/IPlugin.js +1 -2
- package/dist/lib.cjs/base/plugin/errors.js +0 -36
- package/dist/lib.cjs/base/utils.js +2 -1
- package/dist/lib.cjs/connectors/auth-connector/authConnector.js +22 -10
- package/dist/lib.cjs/connectors/base-evm-connector/baseEvmConnector.js +20 -1
- package/dist/lib.cjs/connectors/base-solana-connector/baseSolanaConnector.js +20 -1
- package/dist/lib.cjs/connectors/coinbase-connector/coinbaseConnector.js +6 -5
- package/dist/lib.cjs/connectors/injected-evm-connector/injectedEvmConnector.js +6 -5
- package/dist/lib.cjs/connectors/injected-solana-connector/walletStandardConnector.js +7 -6
- package/dist/lib.cjs/connectors/metamask-connector/metamaskConnector.js +3 -2
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/WalletConnectV2Provider.js +1 -0
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/config.js +1 -0
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/walletConnectV2Connector.js +26 -7
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/walletConnectV2Utils.js +1 -0
- package/dist/lib.cjs/index.js +6 -7
- package/dist/lib.cjs/noModal.js +82 -21
- package/dist/lib.cjs/plugins/wallet-services-plugin/plugin.js +3 -5
- package/dist/lib.cjs/providers/account-abstraction-provider/providers/AccountAbstractionProvider.js +1 -0
- package/dist/lib.cjs/providers/account-abstraction-provider/providers/utils.js +1 -0
- package/dist/lib.cjs/providers/base-provider/baseProvider.js +1 -0
- package/dist/lib.cjs/providers/ethereum-mpc-provider/providers/signingProviders/EthereumSigningProvider.js +1 -0
- package/dist/lib.cjs/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.js +1 -0
- package/dist/lib.cjs/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/formatter.js +1 -0
- package/dist/lib.cjs/providers/solana-provider/providers/injectedProviders/base/baseInjectedProvider.js +1 -0
- package/dist/lib.cjs/providers/solana-provider/providers/injectedProviders/walletStandardProvider.js +1 -0
- package/dist/lib.cjs/providers/xrpl-provider/providers/privateKeyProviders/xrplPrivateKeyProvider.js +1 -0
- package/dist/lib.cjs/react/context/WalletServicesInnerContext.js +4 -3
- package/dist/lib.cjs/react/context/Web3AuthInnerContext.js +28 -11
- package/dist/lib.cjs/react/hooks/useCheckout.js +1 -0
- package/dist/lib.cjs/react/hooks/useFunding.js +1 -0
- package/dist/lib.cjs/react/hooks/useIdentityToken.js +8 -3
- package/dist/lib.cjs/react/hooks/useReceive.js +1 -0
- package/dist/lib.cjs/react/hooks/useSwap.js +1 -0
- package/dist/lib.cjs/react/hooks/useWalletConnectScanner.js +1 -0
- package/dist/lib.cjs/react/hooks/useWalletUI.js +1 -0
- package/dist/lib.cjs/react/hooks/useWeb3Auth.js +2 -0
- package/dist/lib.cjs/react/hooks/useWeb3AuthInner.js +1 -0
- package/dist/lib.cjs/react/solana/hooks/useSolanaWallet.js +1 -0
- package/dist/lib.cjs/react/wagmi/provider.js +1 -0
- package/dist/lib.cjs/types/base/connector/baseConnector.d.ts +2 -1
- package/dist/lib.cjs/types/base/connector/connectorStatus.d.ts +3 -0
- package/dist/lib.cjs/types/base/connector/constants.d.ts +8 -0
- package/dist/lib.cjs/types/base/connector/index.d.ts +1 -0
- package/dist/lib.cjs/types/base/connector/interfaces.d.ts +16 -4
- package/dist/lib.cjs/types/base/core/IWeb3Auth.d.ts +7 -1
- package/dist/lib.cjs/types/base/hooks/index.d.ts +1 -0
- package/dist/lib.cjs/types/base/plugin/IPlugin.d.ts +0 -2
- package/dist/lib.cjs/types/base/plugin/errors.d.ts +0 -10
- package/dist/lib.cjs/types/noModal.d.ts +1 -0
- package/dist/lib.cjs/types/plugins/index.d.ts +0 -1
- package/dist/lib.cjs/types/vue/interfaces.d.ts +1 -0
- package/dist/lib.cjs/types/vue/solana/composables/useSignMessage.d.ts +1 -1
- package/dist/lib.cjs/vue/WalletServicesInnerProvider.js +5 -4
- package/dist/lib.cjs/vue/Web3AuthProvider.js +25 -10
- package/dist/lib.cjs/vue/composables/useCheckout.js +3 -1
- package/dist/lib.cjs/vue/composables/useEnableMFA.js +3 -1
- package/dist/lib.cjs/vue/composables/useFunding.js +3 -1
- package/dist/lib.cjs/vue/composables/useIdentityToken.js +12 -4
- package/dist/lib.cjs/vue/composables/useManageMFA.js +3 -1
- package/dist/lib.cjs/vue/composables/useReceive.js +3 -1
- package/dist/lib.cjs/vue/composables/useSwap.js +3 -1
- package/dist/lib.cjs/vue/composables/useSwitchChain.js +3 -1
- package/dist/lib.cjs/vue/composables/useWalletConnectScanner.js +3 -1
- package/dist/lib.cjs/vue/composables/useWalletUI.js +3 -1
- package/dist/lib.cjs/vue/composables/useWeb3Auth.js +2 -0
- package/dist/lib.cjs/vue/composables/useWeb3AuthConnect.js +3 -1
- package/dist/lib.cjs/vue/composables/useWeb3AuthDisconnect.js +3 -1
- package/dist/lib.cjs/vue/composables/useWeb3AuthInner.js +1 -0
- package/dist/lib.cjs/vue/composables/useWeb3AuthUser.js +3 -1
- package/dist/lib.cjs/vue/solana/composables/useSignAndSendTransaction.js +15 -0
- package/dist/lib.cjs/vue/solana/composables/useSignMessage.js +15 -0
- package/dist/lib.cjs/vue/solana/composables/useSignTransaction.js +15 -0
- package/dist/lib.cjs/vue/solana/composables/useSolanaWallet.js +1 -0
- package/dist/lib.cjs/vue/wagmi/provider.js +1 -0
- package/dist/lib.esm/base/connector/baseConnector.js +9 -5
- package/dist/lib.esm/base/connector/connectorStatus.js +6 -0
- package/dist/lib.esm/base/connector/constants.js +8 -2
- package/dist/lib.esm/base/plugin/IPlugin.js +1 -2
- package/dist/lib.esm/base/plugin/errors.js +1 -37
- package/dist/lib.esm/base/utils.js +1 -1
- package/dist/lib.esm/connectors/auth-connector/authConnector.js +22 -10
- package/dist/lib.esm/connectors/base-evm-connector/baseEvmConnector.js +20 -2
- package/dist/lib.esm/connectors/base-solana-connector/baseSolanaConnector.js +20 -2
- package/dist/lib.esm/connectors/coinbase-connector/coinbaseConnector.js +5 -5
- package/dist/lib.esm/connectors/injected-evm-connector/injectedEvmConnector.js +5 -5
- package/dist/lib.esm/connectors/injected-solana-connector/walletStandardConnector.js +6 -6
- package/dist/lib.esm/connectors/metamask-connector/metamaskConnector.js +2 -2
- package/dist/lib.esm/connectors/wallet-connect-v2-connector/walletConnectV2Connector.js +25 -7
- package/dist/lib.esm/index.js +3 -4
- package/dist/lib.esm/noModal.js +83 -22
- package/dist/lib.esm/plugins/wallet-services-plugin/plugin.js +2 -5
- package/dist/lib.esm/react/context/WalletServicesInnerContext.js +3 -3
- package/dist/lib.esm/react/context/Web3AuthInnerContext.js +28 -11
- package/dist/lib.esm/react/hooks/useIdentityToken.js +8 -3
- package/dist/lib.esm/react/hooks/useWeb3Auth.js +2 -0
- package/dist/lib.esm/vue/WalletServicesInnerProvider.js +4 -4
- package/dist/lib.esm/vue/Web3AuthProvider.js +24 -9
- package/dist/lib.esm/vue/composables/useCheckout.js +2 -0
- package/dist/lib.esm/vue/composables/useEnableMFA.js +2 -0
- package/dist/lib.esm/vue/composables/useFunding.js +2 -0
- package/dist/lib.esm/vue/composables/useIdentityToken.js +11 -3
- package/dist/lib.esm/vue/composables/useManageMFA.js +2 -0
- package/dist/lib.esm/vue/composables/useReceive.js +2 -0
- package/dist/lib.esm/vue/composables/useSwap.js +2 -0
- package/dist/lib.esm/vue/composables/useSwitchChain.js +2 -0
- package/dist/lib.esm/vue/composables/useWalletConnectScanner.js +2 -0
- package/dist/lib.esm/vue/composables/useWalletUI.js +2 -0
- package/dist/lib.esm/vue/composables/useWeb3Auth.js +2 -0
- package/dist/lib.esm/vue/composables/useWeb3AuthConnect.js +2 -0
- package/dist/lib.esm/vue/composables/useWeb3AuthDisconnect.js +2 -0
- package/dist/lib.esm/vue/composables/useWeb3AuthUser.js +2 -0
- package/dist/lib.esm/vue/solana/composables/useSignAndSendTransaction.js +2 -0
- package/dist/lib.esm/vue/solana/composables/useSignMessage.js +3 -1
- package/dist/lib.esm/vue/solana/composables/useSignTransaction.js +2 -0
- package/dist/noModal.umd.min.js +1 -1
- package/package.json +2 -2
- package/dist/lib.cjs/plugins/nft-checkout-plugin/embed.js +0 -131
- package/dist/lib.cjs/plugins/nft-checkout-plugin/enums.js +0 -24
- package/dist/lib.cjs/plugins/nft-checkout-plugin/plugin.js +0 -85
- package/dist/lib.cjs/plugins/nft-checkout-plugin/utils.js +0 -18
- package/dist/lib.cjs/types/plugins/nft-checkout-plugin/embed.d.ts +0 -24
- package/dist/lib.cjs/types/plugins/nft-checkout-plugin/enums.d.ts +0 -14
- package/dist/lib.cjs/types/plugins/nft-checkout-plugin/index.d.ts +0 -2
- package/dist/lib.cjs/types/plugins/nft-checkout-plugin/plugin.d.ts +0 -27
- package/dist/lib.cjs/types/plugins/nft-checkout-plugin/utils.d.ts +0 -3
- package/dist/lib.esm/plugins/nft-checkout-plugin/embed.js +0 -132
- package/dist/lib.esm/plugins/nft-checkout-plugin/enums.js +0 -20
- package/dist/lib.esm/plugins/nft-checkout-plugin/plugin.js +0 -75
- package/dist/lib.esm/plugins/nft-checkout-plugin/utils.js +0 -15
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { useWeb3AuthInner } from './useWeb3AuthInner.js';
|
|
3
3
|
import { WalletInitializationError } from '../../base/errors/index.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useEnableMFA = () => {
|
|
6
7
|
const {
|
|
@@ -15,6 +16,7 @@ const useEnableMFA = () => {
|
|
|
15
16
|
loading.value = true;
|
|
16
17
|
await web3Auth.value.enableMFA();
|
|
17
18
|
} catch (err) {
|
|
19
|
+
log.error("Error enabling MFA", err);
|
|
18
20
|
error.value = err;
|
|
19
21
|
} finally {
|
|
20
22
|
loading.value = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
|
|
3
3
|
import { WalletServicesPluginError } from '../../base/plugin/errors.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useFunding = () => {
|
|
6
7
|
const {
|
|
@@ -17,6 +18,7 @@ const useFunding = () => {
|
|
|
17
18
|
if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
|
|
18
19
|
await plugin.value.showFunding(showFundingParams);
|
|
19
20
|
} catch (err) {
|
|
21
|
+
log.error("Error showing funding", err);
|
|
20
22
|
error.value = err;
|
|
21
23
|
} finally {
|
|
22
24
|
loading.value = false;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ref, watch } from 'vue';
|
|
2
2
|
import { useWeb3AuthInner } from './useWeb3AuthInner.js';
|
|
3
3
|
import { WalletInitializationError } from '../../base/errors/index.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useIdentityToken = () => {
|
|
6
7
|
const {
|
|
7
8
|
web3Auth,
|
|
8
|
-
|
|
9
|
+
isAuthorized
|
|
9
10
|
} = useWeb3AuthInner();
|
|
10
11
|
const loading = ref(false);
|
|
11
12
|
const error = ref(null);
|
|
@@ -21,15 +22,22 @@ const useIdentityToken = () => {
|
|
|
21
22
|
}
|
|
22
23
|
return result === null || result === void 0 ? void 0 : result.idToken;
|
|
23
24
|
} catch (err) {
|
|
25
|
+
log.error("Error getting identity token", err);
|
|
24
26
|
error.value = err;
|
|
25
27
|
} finally {
|
|
26
28
|
loading.value = false;
|
|
27
29
|
}
|
|
28
30
|
};
|
|
29
|
-
watch(
|
|
30
|
-
if (!
|
|
31
|
+
watch(isAuthorized, newIsAuthorized => {
|
|
32
|
+
if (!web3Auth.value) return;
|
|
33
|
+
if (!newIsAuthorized && token.value) {
|
|
31
34
|
token.value = null;
|
|
32
35
|
}
|
|
36
|
+
if (newIsAuthorized && !token.value) {
|
|
37
|
+
token.value = web3Auth.value.idToken;
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
immediate: true
|
|
33
41
|
});
|
|
34
42
|
return {
|
|
35
43
|
loading,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { useWeb3AuthInner } from './useWeb3AuthInner.js';
|
|
3
3
|
import { WalletInitializationError } from '../../base/errors/index.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useManageMFA = () => {
|
|
6
7
|
const {
|
|
@@ -15,6 +16,7 @@ const useManageMFA = () => {
|
|
|
15
16
|
loading.value = true;
|
|
16
17
|
await web3Auth.value.manageMFA();
|
|
17
18
|
} catch (err) {
|
|
19
|
+
log.error("Error managing MFA", err);
|
|
18
20
|
error.value = err;
|
|
19
21
|
} finally {
|
|
20
22
|
loading.value = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
|
|
3
3
|
import { WalletServicesPluginError } from '../../base/plugin/errors.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useReceive = () => {
|
|
6
7
|
const {
|
|
@@ -17,6 +18,7 @@ const useReceive = () => {
|
|
|
17
18
|
if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
|
|
18
19
|
await plugin.value.showReceive(showReceiveParams);
|
|
19
20
|
} catch (err) {
|
|
21
|
+
log.error("Error showing receive", err);
|
|
20
22
|
error.value = err;
|
|
21
23
|
} finally {
|
|
22
24
|
loading.value = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
|
|
3
3
|
import { WalletServicesPluginError } from '../../base/plugin/errors.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useSwap = () => {
|
|
6
7
|
const {
|
|
@@ -17,6 +18,7 @@ const useSwap = () => {
|
|
|
17
18
|
if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
|
|
18
19
|
await plugin.value.showSwap(showSwapParams);
|
|
19
20
|
} catch (err) {
|
|
21
|
+
log.error("Error showing swap", err);
|
|
20
22
|
error.value = err;
|
|
21
23
|
} finally {
|
|
22
24
|
loading.value = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { useWeb3AuthInner } from './useWeb3AuthInner.js';
|
|
3
3
|
import { WalletInitializationError } from '../../base/errors/index.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useSwitchChain = () => {
|
|
6
7
|
const {
|
|
@@ -15,6 +16,7 @@ const useSwitchChain = () => {
|
|
|
15
16
|
loading.value = true;
|
|
16
17
|
await web3Auth.value.switchChain(chainParams);
|
|
17
18
|
} catch (err) {
|
|
19
|
+
log.error("Error switching chain", err);
|
|
18
20
|
error.value = err;
|
|
19
21
|
} finally {
|
|
20
22
|
loading.value = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
|
|
3
3
|
import { WalletServicesPluginError } from '../../base/plugin/errors.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useWalletConnectScanner = () => {
|
|
6
7
|
const {
|
|
@@ -17,6 +18,7 @@ const useWalletConnectScanner = () => {
|
|
|
17
18
|
if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
|
|
18
19
|
await plugin.value.showWalletConnectScanner(showWalletConnectScannerParams);
|
|
19
20
|
} catch (err) {
|
|
21
|
+
log.error("Error showing wallet connect scanner", err);
|
|
20
22
|
error.value = err;
|
|
21
23
|
} finally {
|
|
22
24
|
loading.value = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
|
|
3
3
|
import { WalletServicesPluginError } from '../../base/plugin/errors.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useWalletUI = () => {
|
|
6
7
|
const {
|
|
@@ -17,6 +18,7 @@ const useWalletUI = () => {
|
|
|
17
18
|
if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
|
|
18
19
|
await plugin.value.showWalletUi(showWalletUiParams);
|
|
19
20
|
} catch (err) {
|
|
21
|
+
log.error("Error showing wallet UI", err);
|
|
20
22
|
error.value = err;
|
|
21
23
|
} finally {
|
|
22
24
|
loading.value = false;
|
|
@@ -6,6 +6,7 @@ const useWeb3Auth = () => {
|
|
|
6
6
|
isConnected,
|
|
7
7
|
isInitialized,
|
|
8
8
|
isInitializing,
|
|
9
|
+
isAuthorized,
|
|
9
10
|
provider,
|
|
10
11
|
status,
|
|
11
12
|
web3Auth,
|
|
@@ -16,6 +17,7 @@ const useWeb3Auth = () => {
|
|
|
16
17
|
isConnected,
|
|
17
18
|
isInitialized,
|
|
18
19
|
isInitializing,
|
|
20
|
+
isAuthorized,
|
|
19
21
|
provider,
|
|
20
22
|
status,
|
|
21
23
|
web3Auth,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref, watch } from 'vue';
|
|
2
2
|
import { useWeb3AuthInner } from './useWeb3AuthInner.js';
|
|
3
3
|
import { WalletInitializationError } from '../../base/errors/index.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useWeb3AuthConnect = () => {
|
|
6
7
|
const {
|
|
@@ -30,6 +31,7 @@ const useWeb3AuthConnect = () => {
|
|
|
30
31
|
connectorName.value = web3Auth.value.connectedConnectorName;
|
|
31
32
|
return localProvider;
|
|
32
33
|
} catch (err) {
|
|
34
|
+
log.error("Error connecting", err);
|
|
33
35
|
error.value = err;
|
|
34
36
|
return null;
|
|
35
37
|
} finally {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { useWeb3AuthInner } from './useWeb3AuthInner.js';
|
|
3
3
|
import { WalletInitializationError } from '../../base/errors/index.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useWeb3AuthDisconnect = () => {
|
|
6
7
|
const {
|
|
@@ -15,6 +16,7 @@ const useWeb3AuthDisconnect = () => {
|
|
|
15
16
|
loading.value = true;
|
|
16
17
|
await web3Auth.value.logout(options);
|
|
17
18
|
} catch (err) {
|
|
19
|
+
log.error("Error disconnecting", err);
|
|
18
20
|
error.value = err;
|
|
19
21
|
} finally {
|
|
20
22
|
loading.value = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref, watch } from 'vue';
|
|
2
2
|
import { useWeb3AuthInner } from './useWeb3AuthInner.js';
|
|
3
3
|
import { WalletInitializationError } from '../../base/errors/index.js';
|
|
4
|
+
import { log } from '../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useWeb3AuthUser = () => {
|
|
6
7
|
const {
|
|
@@ -21,6 +22,7 @@ const useWeb3AuthUser = () => {
|
|
|
21
22
|
userInfo.value = result;
|
|
22
23
|
return result;
|
|
23
24
|
} catch (err) {
|
|
25
|
+
log.error("Error getting user info", err);
|
|
24
26
|
error.value = err;
|
|
25
27
|
} finally {
|
|
26
28
|
loading.value = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { WalletInitializationError } from '../../../base/errors/index.js';
|
|
3
3
|
import { useSolanaWallet } from './useSolanaWallet.js';
|
|
4
|
+
import { log } from '../../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useSignAndSendTransaction = () => {
|
|
6
7
|
const {
|
|
@@ -18,6 +19,7 @@ const useSignAndSendTransaction = () => {
|
|
|
18
19
|
data.value = signature;
|
|
19
20
|
return signature;
|
|
20
21
|
} catch (err) {
|
|
22
|
+
log.error("Error signing and sending transaction", err);
|
|
21
23
|
error.value = err;
|
|
22
24
|
} finally {
|
|
23
25
|
loading.value = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
|
-
import { WalletInitializationError } from '../../../base/errors/index.js';
|
|
3
2
|
import { useSolanaWallet } from './useSolanaWallet.js';
|
|
3
|
+
import { WalletInitializationError } from '../../../base/errors/index.js';
|
|
4
|
+
import { log } from '../../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useSignMessage = () => {
|
|
6
7
|
const {
|
|
@@ -20,6 +21,7 @@ const useSignMessage = () => {
|
|
|
20
21
|
data.value = signature;
|
|
21
22
|
return signature;
|
|
22
23
|
} catch (err) {
|
|
24
|
+
log.error("Error signing message", err);
|
|
23
25
|
error.value = err;
|
|
24
26
|
} finally {
|
|
25
27
|
loading.value = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { WalletInitializationError } from '../../../base/errors/index.js';
|
|
3
3
|
import { useSolanaWallet } from './useSolanaWallet.js';
|
|
4
|
+
import { log } from '../../../base/loglevel.js';
|
|
4
5
|
|
|
5
6
|
const useSignTransaction = () => {
|
|
6
7
|
const {
|
|
@@ -18,6 +19,7 @@ const useSignTransaction = () => {
|
|
|
18
19
|
data.value = signedTransaction;
|
|
19
20
|
return signedTransaction;
|
|
20
21
|
} catch (err) {
|
|
22
|
+
log.error("Error signing transaction", err);
|
|
21
23
|
error.value = err;
|
|
22
24
|
} finally {
|
|
23
25
|
loading.value = false;
|