Skip to content

Commit 47c0984

Browse files
committed
kit: Updated Faucet and useFaucet with the latest faucet API. Added SuiProvider.walletSlushWallet param to replace SuiProvider.walletStashedWallet. chore: Updated dependencies.
1 parent b1bd61d commit 47c0984

12 files changed

Lines changed: 2680 additions & 2606 deletions

File tree

apps/docs/package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,42 @@
1313
"deploy:firebase": "firebase deploy --only hosting"
1414
},
1515
"dependencies": {
16-
"@mysten/dapp-kit": "^0.14.50",
17-
"@mysten/sui": "^1.21.2",
18-
"@mysten/suins": "^0.7.2",
19-
"@mysten/wallet-standard": "^0.13.26",
20-
"@radix-ui/react-select": "^2.1.6",
21-
"@radix-ui/react-toggle": "^1.1.2",
22-
"@radix-ui/themes": "^3.2.0",
16+
"@mysten/dapp-kit": "^0.16.5",
17+
"@mysten/sui": "^1.30.1",
18+
"@mysten/suins": "^0.7.17",
19+
"@mysten/wallet-standard": "^0.15.2",
20+
"@radix-ui/react-select": "^2.2.5",
21+
"@radix-ui/react-toggle": "^1.1.9",
22+
"@radix-ui/themes": "^3.2.1",
2323
"@suiware/kit": "workspace:*",
24-
"@tanstack/react-query": "^5.66.9",
25-
"bignumber.js": "^9.1.2",
24+
"@tanstack/react-query": "^5.77.2",
25+
"bignumber.js": "^9.3.0",
2626
"clsx": "^2.1.1",
27-
"lucide-react": "^0.468.0",
28-
"react": "^19.0.0",
29-
"react-dom": "^19.0.0",
27+
"lucide-react": "^0.511.0",
28+
"react": "^19.1.0",
29+
"react-dom": "^19.1.0",
3030
"react-hot-toast": "^2.5.2",
3131
"react-use": "^17.6.0"
3232
},
3333
"devDependencies": {
34-
"@types/node": "^22.13.5",
35-
"@types/react": "^19.0.10",
36-
"@types/react-dom": "^19.0.4",
37-
"@typescript-eslint/eslint-plugin": "^8.24.1",
38-
"@typescript-eslint/parser": "^8.24.1",
39-
"@vitejs/plugin-react-swc": "^3.8.0",
40-
"autoprefixer": "^10.4.20",
34+
"@types/node": "^22.15.23",
35+
"@types/react": "^19.1.6",
36+
"@types/react-dom": "^19.1.5",
37+
"@typescript-eslint/eslint-plugin": "^8.33.0",
38+
"@typescript-eslint/parser": "^8.33.0",
39+
"@vitejs/plugin-react-swc": "^3.10.0",
40+
"autoprefixer": "^10.4.21",
4141
"env-file-rw": "^1.0.0",
42-
"eslint": "^9.21.0",
43-
"eslint-config-prettier": "^9.1.0",
44-
"eslint-plugin-react-hooks": "^5.1.0",
45-
"eslint-plugin-react-refresh": "^0.4.19",
42+
"eslint": "^9.27.0",
43+
"eslint-config-prettier": "^10.1.5",
44+
"eslint-plugin-react-hooks": "^5.2.0",
45+
"eslint-plugin-react-refresh": "^0.4.20",
4646
"postcss": "^8.5.3",
47-
"prettier": "^3.5.2",
47+
"prettier": "^3.5.3",
4848
"prettier-plugin-tailwindcss": "^0.6.11",
4949
"tailwindcss": "^3.4.17",
50-
"typescript": "^5.7.3",
51-
"vite": "^6.1.1",
50+
"typescript": "^5.8.3",
51+
"vite": "^6.3.5",
5252
"vite-tsconfig-paths": "^5.1.4"
5353
}
5454
}

apps/docs/src/components/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const App: FC = () => {
2222
customNetworkConfig={networkConfig}
2323
defaultNetwork={'localnet'}
2424
walletAutoConnect={false}
25-
walletStashedName={APP_NAME}
25+
walletSlushName={APP_NAME}
2626
themeSettings={themeSettings}
2727
>
2828
<IndexPage />

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"format": "turbo run format"
1515
},
1616
"devDependencies": {
17-
"@changesets/cli": "^2.28.1",
18-
"prettier": "^3.5.2",
19-
"turbo": "^2.4.2"
17+
"@changesets/cli": "^2.29.4",
18+
"prettier": "^3.5.3",
19+
"turbo": "^2.5.3"
2020
},
2121
"packageManager": "pnpm@10.4.1",
2222
"name": "suiware-kit-monorepo",

packages/eslint-config/package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
"private": true,
55
"files": [
66
"library.js",
7-
"react.js",
8-
"storybook.js"
7+
"react.js"
98
],
109
"devDependencies": {
1110
"@vercel/style-guide": "^6.0.0",
12-
"eslint-config-turbo": "^2.4.2",
13-
"eslint-plugin-mdx": "^3.1.5",
14-
"eslint-plugin-only-warn": "^1.1.0",
15-
"eslint-plugin-storybook": "^0.8.0"
11+
"eslint-config-turbo": "^2.5.3",
12+
"eslint-plugin-mdx": "^3.4.2",
13+
"eslint-plugin-only-warn": "^1.1.0"
1614
}
1715
}

packages/eslint-config/storybook.js

Lines changed: 0 additions & 45 deletions
This file was deleted.

packages/kit/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -125,39 +125,39 @@
125125
"scripts": {
126126
"build": "tsup && pnpm run styles",
127127
"dev": "pnpm run styles && tsup --watch",
128-
"lint": "eslint . --max-warnings 0",
128+
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
129129
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
130130
"format": "prettier --write './src/**/*.{js,jsx,ts,tsx}'",
131131
"styles": "tailwindcss -c ./tailwind.config.mjs -i ./src/styles/main.css -o ./dist/main.css --minify"
132132
},
133133
"devDependencies": {
134-
"@mysten/dapp-kit": "^0.14.50",
135-
"@mysten/sui": "^1.21.2",
136-
"@mysten/suins": "^0.7.2",
137-
"@mysten/wallet-standard": "^0.13.26",
134+
"@mysten/dapp-kit": "^0.16.5",
135+
"@mysten/sui": "^1.30.1",
136+
"@mysten/suins": "^0.7.17",
137+
"@mysten/wallet-standard": "^0.15.2",
138138
"@radix-ui/colors": "^3.0.0",
139139
"@repo/eslint-config": "workspace:*",
140140
"@repo/typescript-config": "workspace:*",
141-
"@tanstack/react-query": "^5.66.9",
141+
"@tanstack/react-query": "^5.77.2",
142142
"@types/lodash.debounce": "^4.0.9",
143-
"@types/node": "^22.13.5",
144-
"@types/react": "^19.0.10",
145-
"@types/react-dom": "^19.0.4",
146-
"autoprefixer": "^10.4.20",
147-
"eslint": "^8.57.1",
143+
"@types/node": "^22.15.23",
144+
"@types/react": "^19.1.6",
145+
"@types/react-dom": "^19.1.5",
146+
"autoprefixer": "^10.4.21",
147+
"eslint": "^9.27.0",
148148
"postcss": "^8.5.3",
149-
"prettier": "^3.5.2",
149+
"prettier": "^3.5.3",
150150
"prettier-plugin-tailwindcss": "^0.6.11",
151-
"react": "^19.0.0",
151+
"react": "^19.1.0",
152152
"tailwindcss": "^3.4.17",
153-
"tsup": "^8.3.6",
154-
"typescript": "^5.7.3"
153+
"tsup": "^8.5.0",
154+
"typescript": "^5.8.3"
155155
},
156156
"dependencies": {
157-
"@radix-ui/themes": "^3.2.0",
158-
"bignumber.js": "^9.1.2",
157+
"@radix-ui/themes": "^3.2.1",
158+
"bignumber.js": "^9.3.0",
159159
"lodash.debounce": "^4.0.8",
160-
"lucide-react": "^0.469.0"
160+
"lucide-react": "^0.511.0"
161161
},
162162
"peerDependencies": {
163163
"@mysten/dapp-kit": "^0.14.50",

packages/kit/src/helpers/faucet.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { getFaucetHost, requestSuiFromFaucetV1 } from '@mysten/sui/faucet'
1+
import { getFaucetHost, requestSuiFromFaucetV2 } from '@mysten/sui/faucet'
22

33
export const fundAddress = async (
44
address: string,
55
network: 'localnet' | 'devnet' | 'testnet'
66
) => {
7-
return await requestSuiFromFaucetV1({
7+
return await requestSuiFromFaucetV2({
88
host: getFaucetHost(network),
99
recipient: address,
1010
})

packages/kit/src/hooks/useFaucet.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ const useFaucet = ({
5858
}
5959

6060
try {
61-
const { error } = await fundAddress(
61+
const { status } = await fundAddress(
6262
fundedAddress,
6363
ctx.network as 'localnet' | 'devnet'
6464
)
65-
if (error) {
65+
if (status !== 'Success') {
6666
onError != null &&
6767
onError(
68-
new Error(error),
68+
new Error(status.Failure.internal),
6969
'Cannot fund the address on this network at the moment'
7070
)
7171
}

packages/kit/src/providers/SuiProvider.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export interface ISuiProviderProps extends PropsWithChildren {
1818
customNetworkConfig?: NetworkConfigs<NetworkConfig | SuiClient> | undefined
1919
defaultNetwork?: string
2020
walletAutoConnect?: boolean
21+
/**
22+
* @deprecated Use `walletSlushName` instead.
23+
*/
2124
walletStashedName?: string
25+
walletSlushName?: string
2226
themeSettings?: Theme | null
2327
}
2428

@@ -31,6 +35,7 @@ const SuiProvider: FC<ISuiProviderProps> = ({
3135
defaultNetwork,
3236
walletAutoConnect,
3337
walletStashedName,
38+
walletSlushName,
3439
themeSettings,
3540
}) => {
3641
return (
@@ -42,7 +47,7 @@ const SuiProvider: FC<ISuiProviderProps> = ({
4247
<WalletProvider
4348
autoConnect={walletAutoConnect}
4449
theme={themeSettings}
45-
stashedWallet={{ name: walletStashedName || 'Sui Wallet' }}
50+
slushWallet={{ name: walletSlushName || walletStashedName || 'Sui Wallet' }}
4651
>
4752
{children}
4853
</WalletProvider>

0 commit comments

Comments
 (0)