Skip to content

Commit 58402f0

Browse files
committed
feat: add goerli
1 parent 10c5e42 commit 58402f0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

packages/payment-processor/src/payment/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function getProvider(): providers.Web3Provider {
3030

3131
/**
3232
* Utility to get a network provider, depending on the request's currency network.
33-
* Will throw an error if the network isn't mainnet or rinkeby
33+
* Will throw an error if the network isn't mainnet, rinkeby, or goerli
3434
*
3535
* @param request
3636
*/

packages/payment-processor/test/payment/utils.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ describe('getNetworkProvider', () => {
108108
expect(getNetworkProvider(request)).toBeInstanceOf(providers.Provider);
109109
});
110110

111+
it('returns a provider for goerli', () => {
112+
const request: any = {
113+
currencyInfo: {
114+
network: 'goerli',
115+
},
116+
};
117+
expect(getNetworkProvider(request)).toBeInstanceOf(providers.Provider);
118+
});
119+
111120
it('fails for other network', () => {
112121
const request: any = {
113122
currencyInfo: {

0 commit comments

Comments
 (0)