OSDN Git Service

add the logic for new asset page.
[bytom/bytom-electron.git] / src / features / shared / actions / create.js
index c1f05c7..8c05c02 100644 (file)
@@ -29,6 +29,16 @@ export default function(type, options = {}) {
         data[fieldName] = parseInt(data[fieldName])
       })
 
+      if(data.definition.description.length === 0 ){
+        data.definition.description = {}
+      }else {
+        const description = {}
+        data.definition.description.forEach(key => {
+          description[key.key] = key.value
+        })
+        data.definition.description = description
+      }
+
       if (data.xpubs) {
         data.rootXpubs = []
         data.xpubs.forEach(key => {