EOSIO/eosjs

JsSignatureProvider error when create new JsSignatureProvider

midastouch-dev opened this issue · 0 comments

I got the error when use JsSignatureProvider on React Native app. My code is

import { Api, JsonRpc, RpcError } from 'eosjs';
import { JsSignatureProvider } from 'eosjs/dist/eosjs-jssig';

const defaultPrivateKey = ['5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3'];
const signatureProvider = new JsSignatureProvider(defaultPrivateKey);

The issue is

Possible Unhandled Promise Rejection (id: 0):
TypeError: priv.getPublicKey is not a function. (In 'priv.getPublicKey()', 'priv.getPublicKey' is undefined)
JsSignatureProvider@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.picomobilewallet&modulesOnly=false&runModule=true:201683:41
...

Please check this issue