Skip to content

Commit c23f8fc

Browse files
committed
fix: fix wrong variable name
1 parent 73da103 commit c23f8fc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/payment-processor/src/payment/single-request-forwarder.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export async function deploySingleRequestForwarder(
4747
signer,
4848
);
4949

50-
if (!singleRequestProxyFactory.address) {
50+
if (!singleRequestForwarderFactory.address) {
5151
throw new Error(`SingleRequestForwarderFactory not found on chain ${paymentChain}`);
5252
}
5353

@@ -111,10 +111,10 @@ export async function deploySingleRequestForwarder(
111111
}
112112

113113
/**
114-
* Validates that a contract is a SingleRequestProxy by checking required methods
114+
* Validates that a contract is a SingleRequestForwarder by checking required methods
115115
* @param proxyAddress - The address of the contract to validate
116116
* @param signer - The Ethereum signer used to interact with the contract
117-
* @throws {Error} If the contract is not a valid SingleRequestProxy
117+
* @throws {Error} If the contract is not a valid SingleRequestForwarder
118118
*/
119119
async function validateSingleRequestForwarder(
120120
forwarderAddress: string,
@@ -212,11 +212,11 @@ export async function payWithEthereumSingleRequestForwarder(
212212
await forwarderContract.tokenAddress();
213213

214214
// If the token address is fetched, it means the contract is an ERC20SingleRequestForwarder.
215-
throw new Error('Contract is not an EthereumSingleRequestProxy');
215+
throw new Error('Contract is not an EthereumSingleRequestForwarder');
216216
} catch (error) {
217-
// If the token address is not fetched, it means the contract is an EthereumSingleRequestProxy.
218-
if (error.message === 'Contract is not an EthereumSingleRequestProxy') {
219-
// If the error message is 'Contract is not an EthereumSingleRequestProxy', throw the error.
217+
// If the token address is not fetched, it means the contract is an EthereumSingleRequestForwarder.
218+
if (error.message === 'Contract is not an EthereumSingleRequestForwarder') {
219+
// If the error message is 'Contract is not an EthereumSingleRequestForwarder', throw the error.
220220
throw error;
221221
}
222222
}

0 commit comments

Comments
 (0)