This repository has been archived by the owner on Jul 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Live 719/new live apps providers (#1785)
* added new non-breaking providers * linted & removed debug * fixed a dumb bug * multibuy can now handle dynamic provider config * improved ticker filtering * switched from type to mode
- Loading branch information
Showing
18 changed files
with
3,010 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import network from "../../../../network"; | ||
import { getEnv } from "../../../../env"; | ||
import type { GlobalCatalog } from "../types"; | ||
import mockData from "./mock.json"; | ||
|
||
export const providers = [ | ||
{ | ||
value: "production", | ||
url: getEnv("PLATFORM_GLOBAL_CATALOG_API_URL"), | ||
}, | ||
{ | ||
value: "staging", | ||
url: getEnv("PLATFORM_GLOBAL_CATALOG_STAGING_API_URL"), | ||
}, | ||
]; | ||
|
||
export function getProviderURL(value: string): string { | ||
const provider = providers.find((provider) => provider.value === value); | ||
|
||
if (!provider) { | ||
throw new Error(`remote ramp catalog provider "${value}" not found`); | ||
} | ||
return provider.url; | ||
} | ||
|
||
const api = { | ||
fetchGlobalCatalog: async (provider: string): Promise<GlobalCatalog> => { | ||
if (getEnv("MOCK")) { | ||
return mockData as GlobalCatalog; | ||
} | ||
|
||
const { data } = await network({ | ||
method: "GET", | ||
headers: { | ||
Origin: "http://localhost:3000", | ||
}, | ||
url: getProviderURL(provider), | ||
}); | ||
return data as GlobalCatalog; | ||
}, | ||
}; | ||
export default api; |
Oops, something went wrong.
4111ff9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ 67 txs ❌ 5 txs ($350.51) for Bot 'Phosphore'
5 mutation errors
Details of the 72 mutations
Spec Algorand (6)
Spec Bitcoin (5)
Spec Bitcoin Testnet (22)
Spec Bitcoin Cash (7)
Spec Bitcoin Gold (5)
Spec Dash (2)
Spec Digibyte (7)
Spec DogeCoin (7)
Spec Komodo (5)
Spec Litecoin (7)
Spec Peercoin (5)
Spec PivX (5)
Spec Qtum (5)
Spec Stakenet (5)
Spec Vertcoin (5)
Spec Viacoin (5)
Spec ZCash (5)
Spec Horizen (5)
Spec Decred (failed)
Spec Celo (5)
Spec Cosmos (10)
Spec Crypto.org Testnet (6)
Spec Crypto.org (failed)
Spec Elrond (3)
Spec BSC (7)
Spec Polygon (10)
Spec Ethereum (failed)
Spec Ethereum Classic (6)
Spec Ethereum Ropsten (10)
Spec Polkadot (2)
Spec XRP (5)
Spec Solana (7)
Spec Stellar (failed)
Spec Tezos (failed)
Spec Tron (failed)
Details of the 65 uncovered mutations
Spec Algorand (3)
Spec Bitcoin (4)
Spec Bitcoin Cash (1)
Spec Bitcoin Gold (1)
Spec Dash (4)
Spec Digibyte (1)
Spec Komodo (2)
Spec Litecoin (2)
Spec Peercoin (1)
Spec PivX (1)
Spec Qtum (2)
Spec Stakenet (1)
Spec Vertcoin (1)
Spec Viacoin (1)
Spec ZCash (2)
Spec Horizen (1)
Spec Decred (4)
Spec Cosmos (2)
Spec Crypto.org (1)
Spec BSC (2)
Spec Polygon (1)
Spec Ethereum (6)
Spec Polkadot (5)
Spec Stellar (1)
Spec Tezos (7)
Spec Tron (8)
Portfolio ($350.51)
Details of the 35 currencies
4111ff9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ 67 txs ❌ 6 txs ($352.46) for Bot 'Phosphore'
6 mutation errors
Details of the 73 mutations
Spec Algorand (6)
Spec Bitcoin (5)
Spec Bitcoin Testnet (22)
Spec Bitcoin Cash (7)
Spec Bitcoin Gold (5)
Spec Dash (2)
Spec Digibyte (7)
Spec DogeCoin (7)
Spec Komodo (5)
Spec Litecoin (7)
Spec Peercoin (5)
Spec PivX (5)
Spec Qtum (5)
Spec Stakenet (5)
Spec Vertcoin (5)
Spec Viacoin (5)
Spec ZCash (5)
Spec Horizen (5)
Spec Decred (failed)
Spec Celo (5)
Spec Cosmos (10)
Spec Crypto.org Testnet (6)
Spec Crypto.org (failed)
Spec Elrond (3)
Spec BSC (7)
Spec Polygon (10)
Spec Ethereum (failed)
Spec Ethereum Classic (6)
Spec Ethereum Ropsten (10)
Spec Polkadot (2)
Spec XRP (5)
Spec Solana (7)
Spec Stellar (failed)
Spec Tezos (failed)
Spec Tron (failed)
Details of the 66 uncovered mutations
Spec Algorand (2)
Spec Bitcoin (4)
Spec Bitcoin Cash (1)
Spec Bitcoin Gold (1)
Spec Dash (4)
Spec DogeCoin (1)
Spec Komodo (2)
Spec Peercoin (1)
Spec PivX (1)
Spec Qtum (1)
Spec Stakenet (1)
Spec Vertcoin (2)
Spec Viacoin (1)
Spec ZCash (2)
Spec Horizen (2)
Spec Decred (4)
Spec Celo (1)
Spec Cosmos (4)
Spec Crypto.org (1)
Spec BSC (2)
Spec Polygon (1)
Spec Ethereum (6)
Spec Polkadot (5)
Spec Stellar (1)
Spec Tezos (7)
Spec Tron (8)
Portfolio ($352.46)
Details of the 35 currencies
4111ff9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ 59 txs ❌ 5 txs⚠️ 2 specs ($349.30) for Bot 'Phosphore'
2 critical spec errors
Spec Polygon failed!
Spec Solana failed!
5 mutation errors
Details of the 64 mutations
Spec Algorand (6)
Spec Bitcoin (5)
Spec Bitcoin Testnet (22)
Spec Bitcoin Cash (7)
Spec Bitcoin Gold (5)
Spec Dash (2)
Spec Digibyte (7)
Spec DogeCoin (7)
Spec Komodo (5)
Spec Litecoin (7)
Spec Peercoin (5)
Spec PivX (5)
Spec Qtum (5)
Spec Stakenet (5)
Spec Vertcoin (5)
Spec Viacoin (5)
Spec ZCash (5)
Spec Horizen (5)
Spec Decred (failed)
Spec Celo (5)
Spec Cosmos (11)
Spec Crypto.org Testnet (7)
Spec Crypto.org (failed)
Spec Elrond (3)
Spec BSC (7)
Spec Polygon (failed)
Spec Ethereum (failed)
Spec Ethereum Classic (6)
Spec Ethereum Ropsten (10)
Spec Polkadot (2)
Spec XRP (5)
Spec Solana (1)
Spec Stellar (failed)
Spec Tezos (failed)
Spec Tron (failed)
Details of the 68 uncovered mutations
Spec Algorand (2)
Spec Bitcoin (4)
Spec Bitcoin Gold (2)
Spec Dash (4)
Spec DogeCoin (1)
Spec Komodo (2)
Spec Litecoin (1)
Spec Peercoin (1)
Spec PivX (1)
Spec Qtum (2)
Spec Stakenet (2)
Spec Vertcoin (2)
Spec Viacoin (1)
Spec ZCash (1)
Spec Horizen (3)
Spec Decred (4)
Spec Cosmos (2)
Spec Crypto.org (1)
Spec BSC (2)
Spec Polygon (2)
Spec Ethereum (6)
Spec Polkadot (5)
Spec Solana (1)
Spec Stellar (1)
Spec Tezos (7)
Spec Tron (8)
Portfolio ($349.30)
Details of the 35 currencies