File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,18 @@ import {
9
9
trackDuration ,
10
10
identify ,
11
11
} from '@imtbl/metrics' ;
12
- import { BrowserProvider } from 'ethers' ;
12
+ // eslint-disable-next-line import/no-duplicates
13
+ import * as ethers from 'ethers' ;
14
+ // eslint-disable-next-line import/no-duplicates
15
+ import { BrowserProvider , getAddress } from 'ethers' ;
16
+
17
+ // This patches a bundler issue where @0xsequence/core expects
18
+ // `ethers.getAddress` to exist on the `ethers` namespace, but Parcel
19
+ // fails to attach it in a global build. This ensures the function is
20
+ // available before any Passport code executes.
21
+ if ( typeof ethers === 'object' && ! ethers . getAddress ) {
22
+ ( ethers as any ) . getAddress = getAddress ;
23
+ }
13
24
14
25
/* eslint-disable no-undef */
15
26
const scope = 'openid offline_access profile email transact' ;
You can’t perform that action at this time.
0 commit comments