From 26706152a324c91dd1eb6d3d52d51ad9a8d25063 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Mon, 23 May 2022 12:48:16 +0200 Subject: [PATCH] feat: multi network send transaction --- status_go.nim | 5 +++++ status_go/impl.nim | 2 ++ 2 files changed, 7 insertions(+) diff --git a/status_go.nim b/status_go.nim index 9b178be..89e11d6 100644 --- a/status_go.nim +++ b/status_go.nim @@ -84,6 +84,11 @@ proc sendTransaction*(jsonArgs: string, password: string): string = defer: go_shim.free(funcOut) return $funcOut +proc sendTransactionWithChainId*(chainId: int, jsonArgs: string, password: string): string = + var funcOut = go_shim.sendTransactionWithChainId(chainId.cint, jsonArgs.cstring, password.cstring) + defer: go_shim.free(funcOut) + return $funcOut + proc generateAlias*(pk: string): string = var funcOut = go_shim.generateAlias(pk) defer: go_shim.free(funcOut) diff --git a/status_go/impl.nim b/status_go/impl.nim index 2f1a781..0d32c9b 100644 --- a/status_go/impl.nim +++ b/status_go/impl.nim @@ -33,6 +33,8 @@ proc setSignalEventCallback*(callback: SignalCallback) {.importc: "SetSignalEven proc sendTransaction*(jsonArgs: cstring, password: cstring): cstring {.importc: "SendTransaction".} +proc sendTransactionWithChainId*(chainId: cint, jsonArgs: cstring, password: cstring): cstring {.importc: "SendTransactionWithChainID".} + proc generateAlias*(pk: cstring): cstring {.importc: "GenerateAlias".} proc isAlias*(value: cstring): cstring {.importc: "IsAlias".}