Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The values obtained for dcAccount.data[0] and dcAccount.data[1] in the getAccountFees function are null. #89

Open
wutiange opened this issue Mar 6, 2024 · 0 comments

Comments

@wutiange
Copy link

wutiange commented Mar 6, 2024

image

In the place where updating the antenna or updating the location, querying fees, the function call stack is:
useOnboarding() -> getAssertData
--> useOnboarding() -> getSolanaAssertData
--> useSonala() -> estimateMetaTxnFees
--> useSonala() -> estimateFees
--> useSonala() -> getAccountFees

Through my debugging, I found that the data format of dcAccount.data is:

{
  "parsed": {
    "info": {
      "isNative": false,
      "mint": "dcuc8Amr83Wz27ZkQ2K9NS6r8zRpf1J6cvArEBDZDmm",
      "owner": "Dbgjonwh5kzaQ4N9QFghC6UvFjQrMx1d9gRVf7ZWJTAT",
      "state": "frozen",
      "tokenAmount": {
        "amount": "107000651627",
        "decimals": 0,
        "uiAmount": 107000651627,
        "uiAmountString": "107000651627"
      }
    },
    "type": "account"
  },
  "program": "spl-token",
  "space": 165
}

However, the values extracted from dcAccount.data[0] and dcAccount.data[1] are null.

This resulted in the error 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type undefined.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant