(asset, from, to string)
| 100 | } |
| 101 | |
| 102 | func GetAllowance(asset, from, to string) (string, error) { |
| 103 | result, ontErr := sendRpcRequest("getallowance", []interface{}{asset, from, to}) |
| 104 | if ontErr != nil { |
| 105 | return "", ontErr.Error |
| 106 | } |
| 107 | balance := "" |
| 108 | err := json.Unmarshal(result, &balance) |
| 109 | if err != nil { |
| 110 | return "", fmt.Errorf("json.Unmarshal error:%s", err) |
| 111 | } |
| 112 | return balance, nil |
| 113 | } |
| 114 | |
| 115 | //Transfer ont|ong from account to another account |
| 116 | func Transfer(gasPrice, gasLimit uint64, signer *account.Account, asset, from, to string, amount uint64) (string, error) { |
no test coverage detected