Skip to content

Commit 8871c63

Browse files
authored
Use blockHash in updateBalance function when querying.
Signed-off-by: deuszx <[email protected]>
1 parent 9a4c985 commit 8871c63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/native-fungible/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ <h2>Chain history for <code id="chain-id" class="hex">requesting a new microchai
166166
}
167167

168168
async function updateBalance(application, owner, blockHash) {
169-
const response = JSON.parse(await application.query(gql(`query { tickerSymbol, accounts { entry(key: "${owner}") { value } } }`)));
169+
const response = JSON.parse(await application.query(gql(`query { tickerSymbol, accounts { entry(key: "${owner}") { value } } }`), blockHash));
170170
console.debug('application response:', response);
171171
document.querySelector('#ticker-symbol').textContent = response.data.tickerSymbol;
172172
document.querySelector('#balance').textContent = (+(response?.data?.accounts?.entry.value || 0)).toFixed(2);

0 commit comments

Comments
 (0)