@rango-dev/queue-manager-rango-preset 0.1.11 → 0.1.12-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/queue-manager-rango-preset",
3
- "version": "0.1.11",
3
+ "version": "0.1.12-next.1",
4
4
  "license": "MIT",
5
5
  "module": "dist/queue-manager-rango-preset.esm.js",
6
6
  "main": "dist/index.js",
@@ -56,7 +56,7 @@ async function checkTransactionStatus({
56
56
  const outputAmount: string | null =
57
57
  status?.outputAmount ||
58
58
  (!!currentStep.outputAmount ? currentStep.outputAmount : null);
59
- const prevOutputAmount = currentStep.outputAmount;
59
+ const prevOutputAmount = currentStep.outputAmount || null;
60
60
  swap.extraMessage = status?.extraMessage || swap.extraMessage;
61
61
  swap.extraMessageSeverity = MessageSeverity.info;
62
62
  swap.extraMessageDetail = '';
package/src/configs.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export interface Configs {
2
2
  API_KEY: string;
3
+ BASE_URL?: string;
3
4
  }
4
5
 
5
6
  // this API key is limited and
@@ -12,7 +13,7 @@ let configs: Configs = {
12
13
  };
13
14
 
14
15
  export function getConfig(name: keyof Configs) {
15
- return configs[name];
16
+ return configs[name] || '';
16
17
  }
17
18
 
18
19
  export function setConfig(name: keyof Configs, value: any) {
@@ -5,6 +5,6 @@ let rango: RangoClient | undefined = undefined;
5
5
 
6
6
  export const httpService = () => {
7
7
  if (rango) return rango;
8
- rango = new RangoClient(getConfig('API_KEY'));
8
+ rango = new RangoClient(getConfig('API_KEY'), getConfig('BASE_URL'));
9
9
  return rango;
10
10
  };