From b3eae032f44c8bf6451a2be3efaac014b444ec53 Mon Sep 17 00:00:00 2001 From: stanly-johnson Date: Wed, 5 May 2021 14:26:36 +0530 Subject: [PATCH] update swap types for VLN (#5208) --- .../apps-config/src/api/spec/vln-rococo.ts | 68 ++++++++++++++++--- 1 file changed, 58 insertions(+), 10 deletions(-) diff --git a/packages/apps-config/src/api/spec/vln-rococo.ts b/packages/apps-config/src/api/spec/vln-rococo.ts index d2e6e02e5b..29d3619a1f 100644 --- a/packages/apps-config/src/api/spec/vln-rococo.ts +++ b/packages/apps-config/src/api/spec/vln-rococo.ts @@ -15,6 +15,7 @@ const definitions: OverrideBundleDefinition = { _enum: { Collateral: 'Collateral', Fiat: 'Fiat', + Network: 'NetworkAsset', Usdv: null } }, @@ -29,10 +30,12 @@ const definitions: OverrideBundleDefinition = { 'Vez' ] }, - CurrencyId: 'ForeignCurrencyId', + CurrencyId: 'NetworkAsset', OracleKey: 'Asset', OracleValue: 'FixedU128', - CurrencyIdOf: 'ForeignCurrencyId', + CurrencyIdOf: 'NetworkAsset', + Amount: 'i64', + AmountOf: 'Amount', TimestampedValue: { value: 'OracleValue', timestamp: 'Moment' @@ -50,18 +53,63 @@ const definitions: OverrideBundleDefinition = { Parachain: 'ParaId' } }, - ForeignCurrencyId: { - _enum: { - Token: 'TokenSymbol' - } - }, - TokenSymbol: { + NetworkAsset: { _enum: [ 'ACA', 'AUSD', - 'DOT', - 'USDV' + 'DOT' ] + }, + BaseAsset: 'CurrencyId', + AssetPair: { + base: 'BaseAsset', + quote: 'CurrencyId' + }, + PaymentMethod: { + _enum: [ + 'BankX', + 'BankY' + ] + }, + RatePremiumType: 'FixedU128', + SwapKind: { + _enum: { + In: 'SwapIn', + Out: 'SwapOut' + } + }, + SwapIn: { + _enum: { + Created: null, + Accepted: 'Vec', + Rejected: 'Vec', + Confirmed: 'Vec', + Expired: null, + Completed: null + } + }, + SwapOut: { + _enum: { + Created: null, + Accepted: null, + Rejected: 'Vec', + Confirmed: 'Vec', + Expired: null, + Completed: null + } + }, + PairPrice: { + pair: 'AssetPair', + price: 'FixedU128' + }, + Swap: { + human: 'AccountId', + kind: 'SwapKind', + price: 'PairPrice', + amount: 'FixedU128' + }, + RateDetail: { + rate: 'FixedU128' } } }]