Skip to content

Commit 03eaa6d

Browse files
authored
fix: getPaymentNetworkFrom conversion request (#976)
1 parent 9ff30cd commit 03eaa6d

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

packages/payment-detection/src/payment-network-factory.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,13 @@ export class PaymentNetworkFactory {
165165
return null;
166166
}
167167

168+
const detectionChain = pn.values?.network ?? request.currency.network;
169+
168170
const { id, version } = pn;
169171
return this.createPaymentNetwork(
170172
id as unknown as PaymentTypes.PAYMENT_NETWORK_ID,
171173
request.currency.type,
172-
request.currency.network,
174+
detectionChain,
173175
version,
174176
);
175177
}

packages/smart-contracts/src/lib/artifacts/ChainlinkConversionPath/index.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ export const chainlinkConversionPath = new ContractArtifact<ChainlinkConversionP
8888
address: '0x0818Ad7016138f0A40DFAe30F64a923c2A8F61bA',
8989
creationBlockNumber: 11671698,
9090
},
91-
matic: {
92-
address: '0x0818Ad7016138f0A40DFAe30F64a923c2A8F61bA',
93-
creationBlockNumber: 25999509,
94-
},
9591
celo: {
9692
address: '0x0818Ad7016138f0A40DFAe30F64a923c2A8F61bA',
9793
creationBlockNumber: 11969004,
@@ -115,5 +111,14 @@ export const chainlinkConversionPath = new ContractArtifact<ChainlinkConversionP
115111
},
116112
},
117113
*/
114+
// Unused conversion path contract that messes up with the toolbox
115+
/*
116+
'0.2.0': {
117+
matic: {
118+
address: '0x0818Ad7016138f0A40DFAe30F64a923c2A8F61bA',
119+
creationBlockNumber: 25999509,
120+
},
121+
},
122+
*/
118123
'0.2.0',
119124
);

0 commit comments

Comments
 (0)