Skip to content

Commit 54a7267

Browse files
committed
fix: rename variable
1 parent ca4c90e commit 54a7267

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/paymasterclient.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class PaymasterClient extends ethers.JsonRpcProvider {
9393
if (policyUUID) {
9494
const newConnection = this._getConnection()
9595
newConnection.setHeader("X-MegaFuel-Policy-Uuid", policyUUID)
96-
const sponsorProviderWithHeader = new ethers.JsonRpcProvider(
96+
const provider = new ethers.JsonRpcProvider(
9797
newConnection,
9898
(this as any)._network,
9999
{
@@ -102,7 +102,7 @@ export class PaymasterClient extends ethers.JsonRpcProvider {
102102
polling: (this as any).polling
103103
}
104104
)
105-
return await sponsorProviderWithHeader.send('pm_isSponsorable', [tx])
105+
return await provider.send('pm_isSponsorable', [tx])
106106
}
107107
return await this.send('pm_isSponsorable', [tx])
108108
}
@@ -119,7 +119,7 @@ export class PaymasterClient extends ethers.JsonRpcProvider {
119119
newConnection.setHeader("X-MegaFuel-Policy-Uuid", policyUUID)
120120
}
121121

122-
const sponsorProvider = new ethers.JsonRpcProvider(
122+
const provider = new ethers.JsonRpcProvider(
123123
newConnection,
124124
(this as any)._network,
125125
{
@@ -128,10 +128,8 @@ export class PaymasterClient extends ethers.JsonRpcProvider {
128128
polling: (this as any).polling
129129
}
130130
)
131-
132-
if (policyUUID) {
133-
return await sponsorProvider.send('eth_sendRawTransaction', [signedTx])
134-
}
131+
132+
return await provider.send('eth_sendRawTransaction', [signedTx])
135133
}
136134
return await this.send('eth_sendRawTransaction', [signedTx])
137135
}

0 commit comments

Comments
 (0)