Skip to content

Commit

Permalink
Merge pull request #17 from 1b00/patch-1
Browse files Browse the repository at this point in the history
Update index.md
  • Loading branch information
talkol authored May 18, 2023
2 parents d842a8b + 53c3dd8 commit 6dee3a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 03-client/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ If you have network connectivity issues and get errors like backend nodes unheal

The last interaction was read-only, let's change the contract state by sending a transaction. The main action our counter contract supports is *increment*. Let's add a button to the main screen that sends this transaction. As you recall, sending a transaction on-chain costs gas, so we would expect the wallet to approve this action with the user and show how much TON coin will be spent.

Before starting, we're going a add another hook that will generate a `sender` object from the TON Connect interface. This sender represents the connected wallet and will allow us to send transactions on their behalf. While we're at it, we'll also expose the wallet connection state so we can alter the UI accordingly.
Before starting, we're going to add another hook that will generate a `sender` object from the TON Connect interface. This sender represents the connected wallet and will allow us to send transactions on their behalf. While we're at it, we'll also expose the wallet connection state so we can alter the UI accordingly.

Create the file `src/hooks/useTonConnect.ts` with the following content:

Expand Down Expand Up @@ -419,7 +419,7 @@ Then refresh the web browser viewing the URL shown on-screen. You should see a n

Since your mobile Tonkeeper wallet is connected, this action should reach the Tonkeeper mobile app and cause it to display a confirmation dialog. Notice that this dialog shows the gas cost of the transaction. Approve the transaction on the mobile app. Since the app and wallet are connected, your approval should reach the app and cause it to display an indication that the transaction was sent. As you recall, new transactions must wait until they're included in a block, so this should take 5-10 seconds.

If everything is working, the counter value on screen should refresh automatically and you should a value that his higher by one.
If everything is working, the counter value on screen should refresh automatically and you should see a value that is higher by one.

## Step 8: Style the app

Expand Down

0 comments on commit 6dee3a5

Please sign in to comment.