forked from cerc-io/laconic-wallet
Update registry-sdk version
This commit is contained in:
parent
712d9b643b
commit
3bc5743df4
@ -34,26 +34,26 @@
|
||||
|
||||
```js
|
||||
export default function useInitialization(setWeb3wallet) {
|
||||
const [initialized, setInitialized] = useState(false);
|
||||
const [initialized, setInitialized] = useState(false);
|
||||
|
||||
const onInitialize = useCallback(async () => {
|
||||
try {
|
||||
const web3walletInstance = await createWeb3Wallet();
|
||||
setWeb3wallet(web3walletInstance);
|
||||
const onInitialize = useCallback(async () => {
|
||||
try {
|
||||
const web3walletInstance = await createWeb3Wallet();
|
||||
setWeb3wallet(web3walletInstance);
|
||||
|
||||
setInitialized(true);
|
||||
} catch (err: unknown) {
|
||||
console.error('Error for initializing', err);
|
||||
}
|
||||
}, [setWeb3wallet]);
|
||||
setInitialized(true);
|
||||
} catch (err: unknown) {
|
||||
console.error('Error for initializing', err);
|
||||
}
|
||||
}, [setWeb3wallet]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!initialized) {
|
||||
onInitialize();
|
||||
}
|
||||
}, [initialized, onInitialize]);
|
||||
useEffect(() => {
|
||||
if (!initialized) {
|
||||
onInitialize();
|
||||
}
|
||||
}, [initialized, onInitialize]);
|
||||
|
||||
return initialized;
|
||||
return initialized;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"prepare": "husky"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cerc-io/registry-sdk": "^0.2.3",
|
||||
"@cerc-io/registry-sdk": "^0.2.4",
|
||||
"@cosmjs/amino": "^0.32.3",
|
||||
"@cosmjs/crypto": "^0.32.3",
|
||||
"@cosmjs/proto-signing": "^0.32.3",
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import React, { createContext, useContext, useEffect, useState } from 'react';
|
||||
|
||||
import { SessionTypes } from '@walletconnect/types';
|
||||
import { IWeb3Wallet } from '@walletconnect/web3wallet';
|
||||
|
||||
import { WalletConnectContextProps } from '../types';
|
||||
import useInitialization from '../hooks/useInitialization';
|
||||
import { IWeb3Wallet } from '@walletconnect/web3wallet';
|
||||
|
||||
const WalletConnectContext = createContext<WalletConnectContextProps>({
|
||||
activeSessions: {},
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { createWeb3Wallet } from '../utils/wallet-connect/WalletConnectUtils';
|
||||
|
||||
import { IWeb3Wallet } from '@walletconnect/web3wallet';
|
||||
|
||||
import { createWeb3Wallet } from '../utils/wallet-connect/WalletConnectUtils';
|
||||
|
||||
export default function useInitialization(
|
||||
setWeb3wallet: React.Dispatch<React.SetStateAction<IWeb3Wallet | undefined>>,
|
||||
) {
|
||||
|
||||
@ -752,10 +752,10 @@
|
||||
deepmerge "^3.2.0"
|
||||
hoist-non-react-statics "^3.3.0"
|
||||
|
||||
"@cerc-io/registry-sdk@^0.2.3":
|
||||
version "0.2.3"
|
||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fregistry-sdk/-/0.2.3/registry-sdk-0.2.3.tgz#73e955b4d49d7c97eea40c351bbc21f98bb330f9"
|
||||
integrity sha512-8fXRdyiTXn8WsJ8r3DCSBYzUBNEZYPPk5JGUrEmkGQhKOJr+ZeakN+2t6HrqEVB9IMYTJK9BtVLPA0KlaXILYA==
|
||||
"@cerc-io/registry-sdk@^0.2.4":
|
||||
version "0.2.4"
|
||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fregistry-sdk/-/0.2.4/registry-sdk-0.2.4.tgz#60e4e75b1e6a957cf2b97490af4fda4af07b105f"
|
||||
integrity sha512-hRZJP+s+uBvfrqtmQ38pmf74SyfFDC65AVwvWigJGxc6uKJG4jyuMyhsoD1P4XkjwAQSnFO89TuDC5JGkdXyrA==
|
||||
dependencies:
|
||||
"@cosmjs/amino" "^0.28.1"
|
||||
"@cosmjs/crypto" "^0.28.1"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user