@xyo-network/react-wallet 2.81.1 → 2.81.3
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/browser/index.cjs.map +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.js.map +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +10 -10
- package/src/components/SeedPhrase/DefaultSeedPhrase.stories.tsx +1 -1
- package/src/components/SeedPhrase/dialog/SeedPhraseDialog.stories.tsx +1 -1
- package/src/components/SeedPhrase/settings/SeedPhraseTableRow.stories.tsx +1 -1
- package/src/components/WalletAccountDetails/WalletAccountDetails.stories.tsx +1 -1
- package/src/components/WalletAccountDetails/WalletAccountDetailsWithProvider.stories.tsx +2 -2
- package/src/components/WalletAccountSelect/WalletAccountSelect.stories.tsx +3 -3
- package/src/components/WalletAccountSelect/WalletAccountSelectBar.stories.tsx +2 -2
- package/src/components/WalletAccountSelect/WalletAccountSelectWithProvider.stories.tsx +2 -2
- package/src/hooks/useAccount.ts +1 -1
- package/src/hooks/useWallet.ts +1 -1
package/package.json
CHANGED
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"@xylabs/react-quick-tip-button": "^3.4.0",
|
|
22
22
|
"@xylabs/react-select": "^3.4.0",
|
|
23
23
|
"@xylabs/react-shared": "^3.4.0",
|
|
24
|
-
"@xyo-network/account": "^2.110.
|
|
25
|
-
"@xyo-network/account-model": "^2.110.
|
|
26
|
-
"@xyo-network/react-address-render": "^2.81.
|
|
27
|
-
"@xyo-network/react-network": "^2.81.
|
|
28
|
-
"@xyo-network/react-shared": "^2.81.
|
|
29
|
-
"@xyo-network/wallet-model": "^2.110.
|
|
24
|
+
"@xyo-network/account": "^2.110.5",
|
|
25
|
+
"@xyo-network/account-model": "^2.110.5",
|
|
26
|
+
"@xyo-network/react-address-render": "^2.81.3",
|
|
27
|
+
"@xyo-network/react-network": "^2.81.3",
|
|
28
|
+
"@xyo-network/react-shared": "^2.81.3",
|
|
29
|
+
"@xyo-network/wallet-model": "^2.110.5",
|
|
30
30
|
"async-mutex": "^0.5.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"description": "Common React library for all XYO projects that use React",
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@storybook/react": "^7.6.20",
|
|
42
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
43
|
-
"@xylabs/tsconfig-react": "^3.
|
|
44
|
-
"@xyo-network/react-storybook": "^2.81.
|
|
42
|
+
"@xylabs/ts-scripts-yarn3": "^3.12.1",
|
|
43
|
+
"@xylabs/tsconfig-react": "^3.12.1",
|
|
44
|
+
"@xyo-network/react-storybook": "^2.81.3",
|
|
45
45
|
"react-router-dom": "^6.24.1",
|
|
46
46
|
"typescript": "^5.5.3"
|
|
47
47
|
},
|
|
@@ -95,6 +95,6 @@
|
|
|
95
95
|
},
|
|
96
96
|
"sideEffects": false,
|
|
97
97
|
"types": "dist/browser/index.d.ts",
|
|
98
|
-
"version": "2.81.
|
|
98
|
+
"version": "2.81.3",
|
|
99
99
|
"type": "module"
|
|
100
100
|
}
|
|
@@ -6,7 +6,7 @@ import { Meta, StoryFn } from '@storybook/react'
|
|
|
6
6
|
import { FlexCol } from '@xylabs/react-flexbox'
|
|
7
7
|
import { useState } from 'react'
|
|
8
8
|
|
|
9
|
-
import { SeedPhraseDialog } from './SeedPhraseDialog'
|
|
9
|
+
import { SeedPhraseDialog } from './SeedPhraseDialog.js'
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line import/no-default-export
|
|
12
12
|
export default {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Table, TableBody } from '@mui/material'
|
|
2
2
|
import { Meta, StoryFn } from '@storybook/react'
|
|
3
3
|
|
|
4
|
-
import { SeedPhraseTableRow } from './SeedPhraseTableRow'
|
|
4
|
+
import { SeedPhraseTableRow } from './SeedPhraseTableRow.js'
|
|
5
5
|
|
|
6
6
|
const changeSeedPhrase = (phrase?: string) => alert(`Changed Seed Phrase to: ${phrase}`)
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
|
2
2
|
import { BrowserRouter } from 'react-router-dom'
|
|
3
3
|
|
|
4
|
-
import { WalletAccountDetails } from './WalletAccountDetails'
|
|
4
|
+
import { WalletAccountDetails } from './WalletAccountDetails.js'
|
|
5
5
|
|
|
6
6
|
const StorybookEntry = {
|
|
7
7
|
argTypes: {},
|
|
@@ -2,9 +2,9 @@ import { Meta, StoryFn } from '@storybook/react'
|
|
|
2
2
|
import { DefaultSeedPhrase } from '@xyo-network/react-storybook'
|
|
3
3
|
import { BrowserRouter } from 'react-router-dom'
|
|
4
4
|
|
|
5
|
-
import { WalletProvider } from '../../contexts'
|
|
5
|
+
import { WalletProvider } from '../../contexts/index.js'
|
|
6
6
|
import { useWallet } from '../../hooks/index.js'
|
|
7
|
-
import { WalletAccountDetails } from './WalletAccountDetails'
|
|
7
|
+
import { WalletAccountDetails } from './WalletAccountDetails.js'
|
|
8
8
|
|
|
9
9
|
const StorybookEntry = {
|
|
10
10
|
argTypes: {},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Stack } from '@mui/material'
|
|
2
2
|
import { Meta, StoryFn } from '@storybook/react'
|
|
3
3
|
|
|
4
|
-
import { WalletAccountSelect } from './Select'
|
|
5
|
-
import { WalletProviderDecorator } from './stories'
|
|
6
|
-
import { AccountInfo, RootWalletInfo, SelectedWalletInfo, WalletInfo } from './WalletInfo'
|
|
4
|
+
import { WalletAccountSelect } from './Select.js'
|
|
5
|
+
import { WalletProviderDecorator } from './stories/index.js'
|
|
6
|
+
import { AccountInfo, RootWalletInfo, SelectedWalletInfo, WalletInfo } from './WalletInfo.js'
|
|
7
7
|
|
|
8
8
|
const StorybookEntry = {
|
|
9
9
|
argTypes: {},
|
|
@@ -2,8 +2,8 @@ import { Meta, StoryFn } from '@storybook/react'
|
|
|
2
2
|
import { WalletInstance } from '@xyo-network/wallet-model'
|
|
3
3
|
|
|
4
4
|
import { useWallets } from '../../hooks/index.js'
|
|
5
|
-
import { WalletAccountSelectBar } from './SelectBar'
|
|
6
|
-
import { WalletProviderDecorator } from './stories'
|
|
5
|
+
import { WalletAccountSelectBar } from './SelectBar.js'
|
|
6
|
+
import { WalletProviderDecorator } from './stories/index.js'
|
|
7
7
|
|
|
8
8
|
const PATHS = { paths: ['0', '3', '5'] }
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
|
2
2
|
|
|
3
|
-
import { WalletAccountSelect } from './Select'
|
|
4
|
-
import { WalletProviderDecorator } from './stories'
|
|
3
|
+
import { WalletAccountSelect } from './Select.js'
|
|
4
|
+
import { WalletProviderDecorator } from './stories/index.js'
|
|
5
5
|
|
|
6
6
|
const StorybookEntry = {
|
|
7
7
|
argTypes: {},
|
package/src/hooks/useAccount.ts
CHANGED
|
@@ -51,7 +51,7 @@ export const useAccount = ({ wallet, account, index, required = false }: Account
|
|
|
51
51
|
|
|
52
52
|
return [
|
|
53
53
|
error ? undefined
|
|
54
|
-
: account ?? activeAccount ?? walletContextProvided ? null
|
|
54
|
+
: (account ?? activeAccount ?? walletContextProvided) ? null
|
|
55
55
|
: undefined,
|
|
56
56
|
error,
|
|
57
57
|
]
|
package/src/hooks/useWallet.ts
CHANGED
|
@@ -33,7 +33,7 @@ export const useWallet = ({ mnemonic, wallet, path, required = false, seed }: Wa
|
|
|
33
33
|
return contextAccount
|
|
34
34
|
})()
|
|
35
35
|
|
|
36
|
-
return path ? newAccount?.derivePath?.(path) : newAccount ?? wallet
|
|
36
|
+
return path ? newAccount?.derivePath?.(path) : (newAccount ?? wallet)
|
|
37
37
|
} catch (ex) {
|
|
38
38
|
setError(ex as Error)
|
|
39
39
|
}
|