mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
Added sourceNetworkCode filter to getSummaryRedeem
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.5.14",
|
||||
"version": "0.5.15",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/esm/index.js",
|
||||
"module": "./lib/esm/index.js",
|
||||
|
||||
@@ -92,10 +92,19 @@ class OrionBlockchain {
|
||||
return `https://${this.apiUrl}/`;
|
||||
}
|
||||
|
||||
private getSummaryRedeem = (brokerAddress: string) => fetchWithValidation(
|
||||
`https://${this.apiUrl}/api/atomic/summary-redeem/${brokerAddress}`,
|
||||
atomicSummarySchema,
|
||||
);
|
||||
private getSummaryRedeem = (brokerAddress: string, unshifted?: 1 | 0, sourceNetworkCode?: string) => {
|
||||
const url = new URL(`https://${this.apiUrl}/api/atomic/summary-redeem/${brokerAddress}`);
|
||||
if (unshifted) {
|
||||
url.searchParams.append('unshifted', unshifted.toString());
|
||||
}
|
||||
if (sourceNetworkCode) {
|
||||
url.searchParams.append('sourceNetworkCode', sourceNetworkCode);
|
||||
}
|
||||
return fetchWithValidation(
|
||||
url.toString(),
|
||||
atomicSummarySchema,
|
||||
);
|
||||
};
|
||||
|
||||
private getSummaryClaim = (brokerAddress: string) => fetchWithValidation(
|
||||
`https://${this.apiUrl}/api/atomic/summary-claim/${brokerAddress}`,
|
||||
|
||||
Reference in New Issue
Block a user