Przeglądaj źródła

更新sendfrom 到sendtoaddress,以及getbalance接口

whisker 4 lat temu
rodzic
commit
394d5996ce
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      src/bucash/bucash.go

+ 3 - 2
src/bucash/bucash.go

@@ -199,7 +199,7 @@ func (m BuCashApi) WalleGetBalance(account string) (float64, error) {
 	var liteBalance BalanceResult
 
 	// getbalance all
-	result, err := bucashRpc.RunCall("getbalance", "*")
+	result, err := bucashRpc.RunCall("getbalance")//update by libangzhu 
 
 	if err != nil {
 		fmt.Println("Call getbalance fail:", err.Error())
@@ -259,7 +259,8 @@ func (m *BuCashApi) WalleSendFrom(fromaccount string, tozcashaddress string, amo
 	}
 
 	//
-	result, err := bucashRpc.RunCall("sendfrom", fromaccount, tozcashaddress, amount, minconf, "", "")
+	//result, err := bucashRpc.RunCall("sendfrom", fromaccount, tozcashaddress, amount, minconf, "", "")
+	result, err := bucashRpc.RunCall("sendtoaddress",tozcashaddress, amount, "", "") //add by bangzhu.li at 17:37 16/6/2020 
 
 	if err != nil {
 		fmt.Println("Call sendfrom fail:", err.Error())