Skip to content

Commit 133b601

Browse files
committed
Only warn once
1 parent 365f6f8 commit 133b601

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/modules/select/wallets/imtoken.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ function imtoken(
4343
balance: {
4444
get: () => {
4545
if (!provider) {
46-
!warned &&
46+
if (!warned) {
4747
console.warn(
4848
'The imToken provider does not allow rpc calls preventing Onboard.js from getting the balance. You can pass in a "rpcUrl" to the imToken wallet initialization object to get the balance.'
4949
)
50+
warned = true
51+
}
5052
return Promise.resolve(null)
5153
}
5254

0 commit comments

Comments
 (0)