Skip to content
This repository was archived by the owner on Nov 21, 2022. It is now read-only.
This repository was archived by the owner on Nov 21, 2022. It is now read-only.

submitPayment method is super slow and Throw exception as BadNonce #22

@bhaveshdaswani93

Description

@bhaveshdaswani93

I am using @kinecosystem/kin-sdk-v2 version 0.5.0 SDK
I have two issue with submitPayment method

  • Getting super slow response approx 2 to 3min
  • Sometimes get BadNonce exception
return new BadNonce("", txId);
                   ^

BadNonce
    at errorFromProto (path\node_modules\@kinecosystem\kin-sdk-v2\dist\errors.js:90:20)
    at Object.errorsFromSolanaTx (path\node_modules\@kinecosystem\kin-sdk-v2\dist\errors.js:18:17)
    at path\node_modules\@kinecosystem\kin-sdk-v2\dist\client\internal.js:346:58
    at Object.onReceiveStatus (path\node_modules\grpc\src\client_interceptors.js:1212:9)
    at InterceptingListener._callNext (path\node_modules\grpc\src\client_interceptors.js:568:42)
    at InterceptingListener.onReceiveStatus (path\node_modules\grpc\src\client_interceptors.js:618:8)
    at callback (path\node_modules\grpc\src\client_interceptors.js:847:24)

I am using passing following options to submitPayment method

const txId = await kinClient.submitPayment(
    {
      sender: privateKey,
      destination: publicKey,
      type: TransactionType.P2P,
      quarks: kinToQuarks(kinAmount),
      invoice: {
        Items: [
          {
            amount: kinToQuarks(kinAmount),
            description: "kin spent or p2p",
            sku: new Date().getTime().toString(),
            title: "kin spent or p2p",
          },
        ],
      },
    },
  );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions