Skip to content

Commit e59dd94

Browse files
authored
Fix typos (#221)
fix typos
1 parent 97cc9b6 commit e59dd94

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/04-web3/04-interacting-with-the-contract.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ Generally, there are 4 steps for a dapp to interact with the Starcoin blockchain
55
1. Connect to StarMask
66
2. Generate the rawUserTransaction hex string while calling the contract with params
77
3. Wake up the StarMask and asking the user to confirm the transaction
8-
4. Wait until the transaction was confirmed on the Starcoin blockchian, and display the result
8+
4. Wait until the transaction was confirmed on the Starcoin blockchain, and display the result
99

10-
Let's explain each steps in details with examples from [starmask-test-dapp](https://github.com/starcoinorg/starmask-test-dapp).
10+
Let's explain each step in details with examples from [starmask-test-dapp](https://github.com/starcoinorg/starmask-test-dapp).
1111

1212
## 1. Connect to StarMask
1313

14-
To interact with the Chrome extension StarMask, a Dapp must check wether it is installed or not:
14+
To interact with the Chrome extension StarMask, a Dapp must check whether it is installed or not:
1515

1616
```js
1717
import StarMaskOnboarding from "@starcoin/starmask-onboarding";
@@ -141,7 +141,7 @@ const scriptFunction = await utils.tx.encodeScriptFunctionByResolve(
141141
);
142142
```
143143

144-
Finally, geneate the rawUserTransaction hex string:
144+
Finally, generate the rawUserTransaction hex string:
145145

146146
```js
147147
const payloadInHex = (function () {
@@ -171,7 +171,7 @@ User can either `Reject` or `Confirm` this transaction.
171171

172172
> Tips: before user click either of these two buttons, the Dapp should display a Loading status.
173173
174-
## 4. Wait until the transaction was confirmed on the Starcoin blockchian, and display the result
174+
## 4. Wait until the transaction was confirmed on the Starcoin blockchain, and display the result
175175

176176
A transaction must be confirmed by enough nodes, we can change this in the constant variable `MAX_CONFIRMED_NODES`.
177177
We need to display a loading status, and long polling the staus of the transaction using `transactionHash`, and check the confirmations of the response, and cancle the loading status until confirmations is equal to or larger than `MAX_CONFIRMED_NODES`.

0 commit comments

Comments
 (0)