From 77b8fb6ad3988e2a9c3e5a7aa68411593c5d3cb3 Mon Sep 17 00:00:00 2001 From: Janpo Pan Date: Wed, 2 Dec 2020 19:01:16 +0800 Subject: [PATCH] feat: add types to Bifrost testnet (#4134) --- packages/apps-config/src/api/spec/bifrost.ts | 44 ++++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/packages/apps-config/src/api/spec/bifrost.ts b/packages/apps-config/src/api/spec/bifrost.ts index 80417fa330..725e054e31 100644 --- a/packages/apps-config/src/api/spec/bifrost.ts +++ b/packages/apps-config/src/api/spec/bifrost.ts @@ -65,33 +65,31 @@ export default { from: 'AccountId', token_symbol: 'TokenSymbol' }, - Processing: { tx_id: 'Vec', multi_sig_tx: 'MultiSigTx' }, Sent: { tx_id: 'Vec', from: 'AccountId', token_symbol: 'TokenSymbol' }, - Fail: { tx_id: 'Vec', reason: 'Vec', tx: 'MultiSigTx' }, - Failure: { tx_id: 'Vec', reason: 'Vec' }, + Succeeded: { tx_id: 'Vec' }, + Failed: { tx_id: 'Vec', reason: 'Vec' }, TxOut: { - _enum: { - Initial: 'MultiSigTx', - Generated: 'MultiSigTx', - Signed: 'MultiSigTx', - Processing: 'Processing', - Success: 'Vec', - Fail: 'Fail' - } - }, - TxOutV1: { _enum: { Initialized: 'MultiSigTx', Created: 'MultiSigTx', - CompleteSigned: 'MultiSigTx', + SignComplete: 'MultiSigTx', Sent: 'Sent', - Succeeded: 'Vec', - Failure: 'Failure' + Succeeded: 'Succeeded', + Failed: 'Failed' } }, + RewardRecord: { account_id: 'AccountId', record_amount: 'Balance' }, ConvertPrice: 'u128', RatePerBlock: 'u64', Fee: 'u64', + PoolId: 'u32', + Nonce: 'u32', + PoolDetails: { owner: 'AccountId', swap_fee_rate: 'Fee', active: 'bool' }, + PoolCreateTokenDetails: { + token_id: 'TokenSymbol', + token_balance: 'Balance', + token_weight: 'PoolWeight' + }, TokenPool: 'Balance', VTokenPool: 'Balance', InVariantPool: 'Balance', @@ -104,14 +102,14 @@ export default { 'vIOST' ] }, - TrxStatus: { + TransactionStatus: { _enum: [ - 'Initial', - 'Generated', - 'Signed', - 'Processing', - 'Success', - 'Fail' + 'Initialized', + 'Created', + 'SignComplete', + 'Sent', + 'Succeeded', + 'Failed' ] }, Cost: 'u128',