Merge branch console-data-field of MuKnIO/go-sdk

pull/295/head
MaxMustermann2 2 years ago
commit 24c5bf63c1
No known key found for this signature in database
GPG Key ID: 4F4AB9DB6FF24C94
  1. 12
      pkg/console/console.go

@ -545,18 +545,6 @@ func (b *bridge) HmyGetListAccounts(call jsre.Call) (goja.Value, error) {
return call.VM.ToValue(accounts), nil
}
func getTxData(txObj *goja.Object) ([]byte, error) {
dataObj := txObj.Get("data")
if dataObj != nil {
dataStr := dataObj.Export().(string)
if !strings.HasPrefix(dataStr, "0x") {
return nil, fmt.Errorf("Invalid data literal: %q", dataStr)
}
return hex.DecodeString(dataStr[2:])
}
return nil, nil
}
func (b *bridge) HmySignTransaction(call jsre.Call) (goja.Value, error) {
txObj := call.Arguments[0].ToObject(call.VM)
password := call.Arguments[1].String()

Loading…
Cancel
Save