Skip to content

Commit 67d82f6

Browse files
committed
fix(chrome window problem): fix the chrome window problem
1 parent b8c4c93 commit 67d82f6

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/esm/
55
/lib/
66
/docs/tmp.md
7+
/.idea

example/basic-dapp/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,9 @@ const confluxFaucetContract = new Conflux().Contract({
459459
})
460460

461461
// 初始化钱包
462-
window.conflux = new window.AnyWeb.Provider({
462+
const provider = new window.AnyWeb.Provider({
463463
appId: '693b6401-135a-4dc3-846b-1c05ad2572f6',
464464
}) //
465-
const provider = window.conflux
466465

467466
function getElement(id) {
468467
return document.getElementById(id)

src/provider.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ export class Provider implements IProvider {
7070
this.enable = this.enable.bind(this)
7171

7272
if (typeof window !== 'undefined') {
73-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
74-
// @ts-ignore
75-
window.conflux = this
7673
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
7774
// @ts-ignore
7875
window.anyweb = this

0 commit comments

Comments
 (0)