OSDN Git Service

add the sorting function.
authorZhiting Lin <zlin035@uottawa.ca>
Wed, 20 Feb 2019 09:36:29 +0000 (17:36 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Wed, 20 Feb 2019 09:36:29 +0000 (17:36 +0800)
src/components/layout/profit/action.js
src/components/layout/save/action.js

index 994258d..4928405 100644 (file)
@@ -8,9 +8,12 @@ export function FixedLimitProfit(account, amountBill, saver) {
   return new Promise((resolve, reject) => {
     return listDappUTXO({
       "program": GetContractArgs().profitProgram,
-      "asset": GetContractArgs().assetDeposited
+      "asset": GetContractArgs().assetDeposited,
+      "sort": {
+        "by":"amount",
+        "order":"desc"
+      }
     }).then(resp => {
-
       if(!resp) {
         throw 'cannot load UTXO info.'
       }
index 4f0acd8..1d5324f 100644 (file)
@@ -9,7 +9,11 @@ export function FixedLimitDeposit(account, amount, address) {
   return new Promise((resolve, reject) => {
     return listDappUTXO({
       "program": GetContractArgs().depositProgram,
-      "asset": GetContractArgs().assetBill
+      "asset": GetContractArgs().assetBill,
+      "sort": {
+        "by":"amount",
+        "order":"desc"
+      }
     }).then(resp => {
       if(!resp) {
         throw 'cannot load UTXO info.'