File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,9 @@ export class WebWalletConnector extends Connector {
126126 approvalRequests : ApprovalRequest [ ]
127127 sessionTypedData : TypedData
128128 } ) {
129- await this . ensureWallet ( )
129+ if ( ! this . _wallet ) {
130+ await this . ensureWallet ( )
131+ }
130132
131133 if ( ! this . _wallet ) {
132134 throw new ConnectorNotFoundError ( )
@@ -161,7 +163,9 @@ export class WebWalletConnector extends Connector {
161163 }
162164
163165 async connect ( _args : ConnectArgs = { } ) : Promise < ConnectorData > {
164- await this . ensureWallet ( )
166+ if ( ! this . _wallet ) {
167+ await this . ensureWallet ( )
168+ }
165169
166170 if ( ! this . _wallet ) {
167171 throw new ConnectorNotFoundError ( )
@@ -209,6 +213,10 @@ export class WebWalletConnector extends Connector {
209213 async request < T extends RpcMessage [ "type" ] > (
210214 call : RequestFnCall < T > ,
211215 ) : Promise < RpcTypeToMessageMap [ T ] [ "result" ] > {
216+ if ( ! this . _wallet ) {
217+ await this . ensureWallet ( )
218+ }
219+
212220 if ( ! this . _wallet ) {
213221 throw new ConnectorNotConnectedError ( )
214222 }
You can’t perform that action at this time.
0 commit comments