kinecosystem / kin-node

DEPRECATED! Please use Kinetic: https://developer.kin.org/docs/kinetic
https://developer.kin.org/docs/kinetic
MIT License
16 stars 14 forks source link

client.getTransaction 12 UNIMPLEMENTED: kin4 is not enabled #11

Closed doc-l closed 3 years ago

doc-l commented 3 years ago

Hello,

When I'm trying to do a transaction I get an error that kin 4 is not enabled on v0.3.2. This is the code snippet I'm using:

const client = new Client(
        Environment.Prod,
        {
            appIndex: 1, // my app id
            whitelistKey: PrivateKey.fromString(process.env.HOT_WALLET_SECRET),
        },
    );
    const txHash = Buffer.from('some tx', 'hex');
    const transactionData = await client.getTransaction(txHash);
    const transaction = transactionData.payments[0];
    console.log(transaction)

This is the error:

{
    "errorMessage": "12 UNIMPLEMENTED: kin4 is not enabled",
    "errorType": "Error",
    "stackTrace": [
        "Error: 12 UNIMPLEMENTED: kin4 is not enabled",
        "    at Object.exports.createStatusError (/Users/luc/Projects/kinfit/app/node_modules/grpc/src/common.js:91:15)",
        "    at Object.onReceiveStatus (/Users/luc/Projects/kinfit/app/node_modules/grpc/src/client_interceptors.js:1209:28)",
        "    at InterceptingListener._callNext (/Users/luc/Projects/kinfit/app/node_modules/grpc/src/client_interceptors.js:568:42)",
        "    at InterceptingListener.onReceiveStatus (/Users/luc/Projects/kinfit/app/node_modules/grpc/src/client_interceptors.js:618:8)",
        "    at callback (/Users/luc/Projects/kinfit/app/node_modules/grpc/src/client_interceptors.js:847:24)"
    ]
}

When I install v0.2.2 it works. It also does not work when I set kinVersion to 3 in the client init.

kikengineering commented 3 years ago

@l-hendriks Hi there, thanks for raising this issue. We just released version 0.3.3 that fixes this for Kin 3.

doc-l commented 3 years ago

Awesome, thanks! It works now.