Update content/tutorials/build-apps/build-a-desktop-wallet-in-javascript.md

Co-authored-by: Jackson Mills <aim4math@gmail.com>
This commit is contained in:
Alexander Busse
2023-08-07 11:32:42 +02:00
committed by GitHub
parent ba3a565045
commit da5fbfdf8a

View File

@@ -559,7 +559,7 @@ await client.request({
After this subscription our code attached listeners to the `ledgerClosed` and the `transactions` event. As soon as a `transaction` event is triggered, we do an `account_info` request to get the latest account status, as the transaction could have changed our account's state.
In addition to the subscriptions we added each an initial `ledger` and `accountInfo` request to have some data at application startup, otherwise we would see empty fields until something happened on the ledger which would trigger one of our subscriptions.
In addition to the subscriptions we added an initial `ledger` and `accountInfo` request to have some data at application startup. Otherwise we would see empty fields until something happened on the ledger that triggered one of our subscriptions.
4. Now, add the following code to `preload.js`: