File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
packages/pkp-ethers/src/lib Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,21 @@ export class PKPEthersWallet
8383 constructor ( prop : PKPEthersWalletProp ) {
8484 this . pkpBase = PKPBase . createInstance ( prop ) ;
8585
86- this . rpcProvider = new ethers . providers . JsonRpcProvider (
87- prop . rpc ?? LIT_CHAINS [ 'chronicleTestnet' ] . rpcUrls [ 0 ]
88- ) ;
86+ /**
87+ * @depreacted This is a quick patch for 6.1.1 - Proper fix is handled in this PR
88+ * https://github.com/LIT-Protocol/js-sdk/pull/523
89+ */
90+ const rpcUrl =
91+ prop . rpc ||
92+ ( prop . litNodeClient . config . litNetwork === 'datil-dev'
93+ ? LIT_CHAINS [ 'chronicleTestnet' ] . rpcUrls [ 0 ]
94+ : LIT_CHAINS [ 'datilDevnet' ] . rpcUrls [ 0 ] ) ;
95+
96+ if ( ! rpcUrl ) {
97+ throw new Error ( 'rpcUrl is required' ) ;
98+ }
8999
100+ this . rpcProvider = new ethers . providers . JsonRpcProvider ( rpcUrl ) ;
90101 this . provider = prop . provider ?? this . rpcProvider ;
91102
92103 defineReadOnly ( this , '_isSigner' , true ) ;
You can’t perform that action at this time.
0 commit comments