Skip to content

Commit 56f737d

Browse files
committed
(wip) Infinite making infinite bugs
1 parent 638dca7 commit 56f737d

File tree

4 files changed

+86
-83
lines changed

4 files changed

+86
-83
lines changed

src/plugins/ramps/infinite/infiniteApiTypes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export type InfiniteCustomerType = ReturnType<typeof asInfiniteCustomerType>
163163

164164
export const asInfiniteCustomerStatus = asValue(
165165
'ACTIVE',
166+
'DRAFT',
166167
'UNDER_REVIEW',
167168
'SUSPENDED',
168169
'REJECTED',
@@ -266,6 +267,7 @@ export const asInfiniteCustomerAccountsResponse = asJSON(
266267

267268
// KYC Status types (Infinite format)
268269
export const asInfiniteKycStatus = asValue(
270+
'DRAFT',
269271
'PENDING',
270272
'IN_REVIEW',
271273
'ACTIVE',

src/plugins/ramps/infinite/infiniteRampPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const DEFAULT_PAYMENT_TYPE: FiatPaymentType = 'wire'
5151
// Storage keys
5252
const INFINITE_PRIVATE_KEY = 'infinite_auth_private_key'
5353
// DEV ONLY: This should never be committed as true in production.
54-
const ENABLE_DEV_TESTING_CAPABILITIES = false
54+
const ENABLE_DEV_TESTING_CAPABILITIES = true
5555

5656
// Plugin state interface
5757
export interface InfinitePluginState {

src/plugins/ramps/infinite/workflows/kycWorkflow.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export const kycWorkflow = async (params: Params): Promise<void> => {
3838
// Determine the status to use for the pending scene
3939
let statusForPendingScene: InfiniteKycStatus = kycStatus.kycStatus
4040

41-
// If PENDING, redirect directly to KYC webview (skip form since customer exists)
42-
if (kycStatus.kycStatus === 'PENDING') {
41+
// If DRAFT or PENDING, redirect directly to KYC webview (skip form since customer exists)
42+
if (kycStatus.kycStatus === 'DRAFT' || kycStatus.kycStatus === 'PENDING') {
4343
await openKycWebView(navigationFlow, infiniteApi, customerId, pluginId)
4444

4545
// Check status after webview closes
@@ -289,6 +289,7 @@ const kycStatusToSceneStatus = (
289289
message: lstrings.ramp_kyc_approved_message
290290
}
291291
}
292+
case 'DRAFT':
292293
case 'PENDING':
293294
// KYC flow needs to be started/completed
294295
return {

src/util/corePlugins.ts

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -3,86 +3,86 @@ import type { EdgeCorePluginsInit } from 'edge-core-js'
33
import { ENV } from '../env'
44

55
export const currencyPlugins: EdgeCorePluginsInit = {
6-
// // edge-currency-accountbased:
7-
abstract: ENV.ABSTRACT_INIT,
8-
algorand: ENV.ALGORAND_INIT,
9-
amoy: ENV.AMOY_INIT,
10-
arbitrum: ENV.ARBITRUM_INIT,
11-
avalanche: ENV.AVALANCHE_INIT,
12-
axelar: ENV.AXELAR_INIT,
13-
base: ENV.BASE_INIT,
14-
binance: true,
15-
binancesmartchain: ENV.BINANCE_SMART_CHAIN_INIT,
16-
bobevm: true,
17-
botanix: ENV.BOTANIX_INIT,
18-
cardano: ENV.CARDANO_INIT,
19-
cardanotestnet: ENV.CARDANO_TESTNET_INIT,
20-
celo: ENV.CELO_INIT,
21-
coreum: ENV.COREUM_INIT,
22-
cosmoshub: ENV.COSMOSHUB_INIT,
23-
ecash: ENV.ECASH_INIT,
24-
eos: true,
25-
ethereum: ENV.ETHEREUM_INIT,
26-
ethereumclassic: true,
27-
ethereumpow: ENV.ETHEREUM_POW_INIT,
28-
fantom: ENV.FANTOM_INIT,
29-
filecoin: ENV.FILECOIN_INIT,
30-
filecoinfevm: ENV.FILECOINFEVM_INIT,
31-
filecoinfevmcalibration: ENV.FILECOINFEVM_CALIBRATION_INIT,
32-
fio: ENV.FIO_INIT,
33-
hedera: ENV.HEDERA_INIT,
34-
holesky: ENV.HOLESKY_INIT,
35-
hyperevm: ENV.HYPEREVM_INIT,
36-
liberland: ENV.LIBERLAND_INIT,
37-
liberlandtestnet: false,
38-
optimism: ENV.OPTIMISM_INIT,
39-
osmosis: ENV.OSMOSIS_INIT,
40-
piratechain: true,
41-
polkadot: ENV.POLKADOT_INIT,
42-
polygon: ENV.POLYGON_INIT,
43-
pulsechain: ENV.PULSECHAIN_INIT,
44-
ripple: true,
45-
rsk: ENV.RSK_INIT,
46-
sepolia: ENV.SEPOLIA_INIT,
47-
solana: ENV.SOLANA_INIT,
48-
sonic: ENV.SONIC_INIT,
49-
stellar: true,
50-
sui: true,
51-
telos: true,
52-
tezos: true,
53-
thorchainrune: ENV.THORCHAIN_INIT,
54-
thorchainrunestagenet: ENV.THORCHAIN_INIT,
55-
ton: ENV.TON_INIT,
56-
tron: true,
57-
wax: true,
58-
zano: true,
59-
zcash: true,
60-
zksync: ENV.ZKSYNC_INIT,
61-
// edge-currency-bitcoin:
62-
bitcoin: ENV.BITCOIN_INIT,
63-
bitcoincash: ENV.BITCOINCASH_INIT,
64-
bitcoincashtestnet: false,
65-
bitcoingold: true,
66-
bitcoingoldtestnet: false,
67-
bitcoinsv: true,
68-
bitcointestnet: true,
69-
bitcointestnet4: true,
70-
dash: ENV.DASH_INIT,
71-
digibyte: ENV.DIGIBYTE_INIT,
72-
dogecoin: ENV.DOGE_INIT,
73-
eboost: true,
74-
feathercoin: true,
75-
groestlcoin: ENV.GROESTLCOIN_INIT,
76-
litecoin: ENV.LITECOIN_INIT,
77-
pivx: ENV.PIVX_INIT,
78-
qtum: true,
79-
ravencoin: true,
80-
smartcash: true,
81-
ufo: true,
82-
vertcoin: true,
83-
zcoin: ENV.ZCOIN_INIT,
84-
// edge-currency-monero:
85-
monero: ENV.MONERO_INIT
6+
// // // edge-currency-accountbased:
7+
// abstract: ENV.ABSTRACT_INIT,
8+
// algorand: ENV.ALGORAND_INIT,
9+
// amoy: ENV.AMOY_INIT,
10+
// arbitrum: ENV.ARBITRUM_INIT,
11+
// avalanche: ENV.AVALANCHE_INIT,
12+
// axelar: ENV.AXELAR_INIT,
13+
// base: ENV.BASE_INIT,
14+
// binance: true,
15+
// binancesmartchain: ENV.BINANCE_SMART_CHAIN_INIT,
16+
// bobevm: true,
17+
// botanix: ENV.BOTANIX_INIT,
18+
// cardano: ENV.CARDANO_INIT,
19+
// cardanotestnet: ENV.CARDANO_TESTNET_INIT,
20+
// celo: ENV.CELO_INIT,
21+
// coreum: ENV.COREUM_INIT,
22+
// cosmoshub: ENV.COSMOSHUB_INIT,
23+
// ecash: ENV.ECASH_INIT,
24+
// eos: true,
25+
// ethereum: ENV.ETHEREUM_INIT,
26+
// ethereumclassic: true,
27+
// ethereumpow: ENV.ETHEREUM_POW_INIT,
28+
// fantom: ENV.FANTOM_INIT,
29+
// filecoin: ENV.FILECOIN_INIT,
30+
// filecoinfevm: ENV.FILECOINFEVM_INIT,
31+
// filecoinfevmcalibration: ENV.FILECOINFEVM_CALIBRATION_INIT,
32+
// fio: ENV.FIO_INIT,
33+
// hedera: ENV.HEDERA_INIT,
34+
// holesky: ENV.HOLESKY_INIT,
35+
// hyperevm: ENV.HYPEREVM_INIT,
36+
// liberland: ENV.LIBERLAND_INIT,
37+
// liberlandtestnet: false,
38+
// optimism: ENV.OPTIMISM_INIT,
39+
// osmosis: ENV.OSMOSIS_INIT,
40+
// piratechain: true,
41+
// polkadot: ENV.POLKADOT_INIT,
42+
// polygon: ENV.POLYGON_INIT,
43+
// pulsechain: ENV.PULSECHAIN_INIT,
44+
// ripple: true,
45+
// rsk: ENV.RSK_INIT,
46+
// sepolia: ENV.SEPOLIA_INIT,
47+
// solana: ENV.SOLANA_INIT,
48+
// sonic: ENV.SONIC_INIT,
49+
// stellar: true,
50+
// sui: true,
51+
// telos: true,
52+
// tezos: true,
53+
// thorchainrune: ENV.THORCHAIN_INIT,
54+
// thorchainrunestagenet: ENV.THORCHAIN_INIT,
55+
// ton: ENV.TON_INIT,
56+
// tron: true,
57+
// wax: true,
58+
// zano: true,
59+
// zcash: true,
60+
// zksync: ENV.ZKSYNC_INIT,
61+
// // edge-currency-bitcoin:
62+
bitcoin: ENV.BITCOIN_INIT
63+
// bitcoincash: ENV.BITCOINCASH_INIT,
64+
// bitcoincashtestnet: false,
65+
// bitcoingold: true,
66+
// bitcoingoldtestnet: false,
67+
// bitcoinsv: true,
68+
// bitcointestnet: true,
69+
// bitcointestnet4: true,
70+
// dash: ENV.DASH_INIT,
71+
// digibyte: ENV.DIGIBYTE_INIT,
72+
// dogecoin: ENV.DOGE_INIT,
73+
// eboost: true,
74+
// feathercoin: true,
75+
// groestlcoin: ENV.GROESTLCOIN_INIT,
76+
// litecoin: ENV.LITECOIN_INIT,
77+
// pivx: ENV.PIVX_INIT,
78+
// qtum: true,
79+
// ravencoin: true,
80+
// smartcash: true,
81+
// ufo: true,
82+
// vertcoin: true,
83+
// zcoin: ENV.ZCOIN_INIT,
84+
// // edge-currency-monero:
85+
// monero: ENV.MONERO_INIT
8686
}
8787

8888
export const swapPlugins = {

0 commit comments

Comments
 (0)