From 6f2a7765daca1ac8e3eb65861b3800f49cdf6fe3 Mon Sep 17 00:00:00 2001 From: fox-222 <96783584+fox-222@users.noreply.github.com> Date: Wed, 29 Mar 2023 00:09:05 +0800 Subject: [PATCH] Update faucet.md (#9879) Modified based on [this](https://github.com/MystenLabs/sui/tree/main/sdk/typescript) document. This error is located at [this](https://docs.sui.io/build/faucet) link. The previous code will produce the error "The requested module '@mysten/sui.js' does not provide an export named 'Network'". --------- Co-authored-by: Liam Z --- .typos.toml | 4 ++++ doc/src/build/faucet.md | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .typos.toml diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000000000..f13569808ba33 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,4 @@ +[default] +extend-ignore-re = [ + "[a-zA-Z0-9]{44}" +] diff --git a/doc/src/build/faucet.md b/doc/src/build/faucet.md index 64c0cd4f15aee..b7c0c22fafb38 100644 --- a/doc/src/build/faucet.md +++ b/doc/src/build/faucet.md @@ -43,9 +43,9 @@ Replace `'https://faucet.devnet.sui.io/gas'` with `http://127.0.0.1:5003/gas` wh You can also access the faucet through the TS-SDK. ``` -import { JsonRpcProvider, Network } from '@mysten/sui.js'; +import { JsonRpcProvider, devnetConnection } from '@mysten/sui.js'; // connect to Devnet -const provider = new JsonRpcProvider(Network.DEVNET); +const provider = new JsonRpcProvider(devnetConnection); // get tokens from the Devnet faucet server await provider.requestSuiFromFaucet( ''