Skip to content

Commit 166d947

Browse files
committed
chore: readability and comments
1 parent 4ea38d6 commit 166d947

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/example/src/components/WalletDetails.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ const WalletDetails = () => {
1818
<div>
1919
<p>
2020
Purses:{' '}
21-
{purses?.length
22-
? purses
21+
{purses === undefined
22+
? 'Loading...'
23+
: purses
2324
.map(
2425
(p: PurseJSONState<'nat' | 'copyBag' | 'set' | 'copySet'>) =>
2526
p.brandPetname +
@@ -30,8 +31,7 @@ const WalletDetails = () => {
3031
p.displayInfo.decimalPlaces,
3132
),
3233
)
33-
.join(', ')
34-
: 'Loading...'}
34+
.join(', ')}
3535
</p>
3636
</div>
3737
<div style={{ display: 'flex', alignItems: 'center' }}></div>

packages/example/src/hooks/useWalletManager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const useWalletManager = () => {
2323
await window.keplr.enable(CHAIN_ID);
2424
const signer = await window.keplr.getOfflineSignerOnlyAmino(CHAIN_ID);
2525

26+
// Assumes that the signer will have one account per keplr docs.
2627
const [account] = await signer.getAccounts();
2728
if (!account) {
2829
throw new Error(

0 commit comments

Comments
 (0)