Skip to content

Commit c190973

Browse files
committed
fix: small fixes
1 parent 03914d6 commit c190973

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

frontend/index.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'regenerator-runtime/runtime';
22
import { utils } from 'near-api-js'
3-
import { Wallet } from './near-wallet';
3+
import { Wallet } from './wallet';
44

55
const HELLO_ADDRESS = "hello.near-examples.testnet";
66
const GUEST_ADDRESS = "guestbook.near-examples.testnet";
@@ -10,14 +10,10 @@ const THIRTY_TGAS = '30000000000000';
1010
const NO_DEPOSIT = '0';
1111

1212
// 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-
}
13+
window.onload = () => {
14+
wallet.startUp(
15+
signedAccountId => signedAccountId? signedInFlow(signedAccountId): signedOutFlow()
16+
);
2117

2218
getGreetingAndMessages();
2319
};
File renamed without changes.

0 commit comments

Comments
 (0)