diff --git a/lib/cgo/cli.add_private_key.go b/lib/cgo/cli.add_private_key.go index e32cc63b2..7b1e036a1 100644 --- a/lib/cgo/cli.add_private_key.go +++ b/lib/cgo/cli.add_private_key.go @@ -1,8 +1,6 @@ package main -import ( - cli "github.com/SkycoinProject/skycoin/src/cli" -) +import cli "github.com/SkycoinProject/skycoin/src/cli" /* @@ -10,12 +8,13 @@ import ( #include #include "skytypes.h" + #include "skyfee.h" */ import "C" //export SKY_cli_AddPrivateKey -func SKY_cli_AddPrivateKey(_wlt C.CollectionWallet__Handle, _key string) (____error_code uint32) { - wlt, okwlt := lookupCollectionWalletHandle(_wlt) +func SKY_cli_AddPrivateKey(_wlt *C.CollectionWallet__Handle, _key string) (____error_code uint32) { + wlt, okwlt := lookupCollectionWalletHandle(*_wlt) if !okwlt { ____error_code = SKY_BAD_HANDLE return @@ -29,15 +28,16 @@ func SKY_cli_AddPrivateKey(_wlt C.CollectionWallet__Handle, _key string) (____er } //export SKY_cli_AddPrivateKeyToFile -func SKY_cli_AddPrivateKeyToFile(_walletFile, _key string, pwd C.PasswordReader__Handle) (____error_code uint32) { +func SKY_cli_AddPrivateKeyToFile(_walletFile, _key string, _pr *C.PasswordReader__Handle) (____error_code uint32) { walletFile := _walletFile key := _key - pr, okc := lookupPasswordReaderHandle(pwd) - if !okc { + __pr, okpr := lookupPasswordReaderHandle(*_pr) + if !okpr { ____error_code = SKY_BAD_HANDLE return } - ____return_err := cli.AddPrivateKeyToFile(walletFile, key, *pr) + pr := *__pr + ____return_err := cli.AddPrivateKeyToFile(walletFile, key, pr) ____error_code = libErrorCode(____return_err) if ____return_err == nil { }