You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am just playing around with the api. I have started a canvas chain with canvas --dev --tmp. I am attaching to it using canvas ui and am able to make calls to get the balances for Alice, Bob, and Charlie. However, the balance I get from canvas ui is different from the balances I am getting with the api. Does anyone know what might be causing this? Here is a snip-bit of my code and the output. Seems like I am connected to the development chain since the block number matches.
const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';
const CHARLIE = '5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y';
const wsProvider = new WsProvider('ws://127.0.0.1:9944');
const api = await ApiPromise.create({ provider: wsProvider });
const [chain, nodeName, nodeVersion] = await Promise.all([
api.rpc.system.chain(),
api.rpc.system.name(),
api.rpc.system.version()
]);
console.log(`You are connected to chain ${chain} using ${nodeName} v${nodeVersion}`);
const balances = await api.query.system.account.multi([ALICE, BOB, CHARLIE]);
Here are the outputs:
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
Hi, I am just playing around with the api. I have started a canvas chain with canvas --dev --tmp. I am attaching to it using canvas ui and am able to make calls to get the balances for Alice, Bob, and Charlie. However, the balance I get from canvas ui is different from the balances I am getting with the api. Does anyone know what might be causing this? Here is a snip-bit of my code and the output. Seems like I am connected to the development chain since the block number matches.
Here are the outputs:
![Screen Shot 2021-03-22 at 9 24 57 PM](https://user-images.githubusercontent.com/14323281/111997640-348c7280-8b56-11eb-942a-9d22fe577e8f.png)
![Screen Shot 2021-03-22 at 9 25 37 PM](https://user-images.githubusercontent.com/14323281/111997679-3eae7100-8b56-11eb-82aa-fff4303a739a.png)
![Screen Shot 2021-03-22 at 9 25 17 PM](https://user-images.githubusercontent.com/14323281/111997704-440bbb80-8b56-11eb-8b72-422b684508fe.png)
The text was updated successfully, but these errors were encountered: