We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03914d6 commit c190973Copy full SHA for c190973
frontend/index.js
@@ -1,6 +1,6 @@
1
import 'regenerator-runtime/runtime';
2
import { utils } from 'near-api-js'
3
-import { Wallet } from './near-wallet';
+import { Wallet } from './wallet';
4
5
const HELLO_ADDRESS = "hello.near-examples.testnet";
6
const GUEST_ADDRESS = "guestbook.near-examples.testnet";
@@ -10,14 +10,10 @@ const THIRTY_TGAS = '30000000000000';
10
const NO_DEPOSIT = '0';
11
12
// Setup on page load
13
-window.onload = async () => {
14
- let signedAccountId = await wallet.startUp(()=>{});
15
-
16
- if (signedAccountId) {
17
- signedInFlow(signedAccountId);
18
- } else {
19
- signedOutFlow();
20
- }
+window.onload = () => {
+ wallet.startUp(
+ signedAccountId => signedAccountId? signedInFlow(signedAccountId): signedOutFlow()
+ );
21
22
getGreetingAndMessages();
23
};
frontend/near-wallet.js renamed to frontend/wallet.js
0 commit comments