OSDN Git Service

add the actions for normal transaction
authorZhiting Lin <zlin035@uottawa.ca>
Wed, 7 Feb 2018 04:16:24 +0000 (12:16 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Wed, 7 Feb 2018 04:16:24 +0000 (12:16 +0800)
src/features/transactions/actions.js

index 3a525c3..2ce5b34 100644 (file)
@@ -17,6 +17,14 @@ function preprocessTransaction(formParams) {
     actions: copy.actions,
   }
 
+  const normalT = formParams.normalTransaction
+  debugger
+  if(normalT != null){
+    builder.actions.push({accountAlias: normalT.account, assetAlias: 'btm', amount: normalT.gas, type: 'spend_account'})
+    builder.actions.push({accountAlias: normalT.account, assetAlias: normalT.asset, amount: normalT.amount, type: 'spend_account'})
+    builder.actions.push({address: normalT.address, assetAlias: normalT.asset, amount: normalT.amount, type: 'control_address'})
+  }
+
   if (builder.baseTransaction == '') {
     delete builder.baseTransaction
   }