Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

unable to create a transaction using testweave-sdk #11

Open
Retamogordo opened this issue Jun 23, 2022 · 0 comments
Open

unable to create a transaction using testweave-sdk #11

Retamogordo opened this issue Jun 23, 2022 · 0 comments

Comments

@Retamogordo
Copy link

Retamogordo commented Jun 23, 2022

Hi guys,
I'm trying to mess around with arweave, I managed to have some success using ArLocal,
now I'm trying to migrate to testweave-sdk, so I can use it in a browser.
However I have this strange issue with a basic test:
Here is code snippet:

it("Arweave create test transaction", async () => {
const arweave1 = Arweave.init({
host: 'localhost',
port: 1984,
protocol: 'http',
timeout: 20000,
logging: false,
});
const testWeave1 = await TestWeave.init(arweave1);
let data = "test arweave transaction creation";
console.log(testWeave1.rootJWK);

  const dataTransaction = await arweave1.createTransaction({
    data
  }, testWeave1.rootJWK);

})

Inside createTransaction method the following error occurs:
TypeError: Cannot read properties of undefined (reading 'data')
at /home/yury/Desktop/SolanaProjects/stakan/src/common/transactions.ts:51:25
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Arweave.createTransaction (src/common/common.ts:105:29)

I see that rootJWK contains an object.

My packages are:
stakan@ /home/yury/Desktop/SolanaProjects/stakan
└─┬ testweave-sdk@0.2.2
├─┬ arweave@1.11.4
│ └─┬ arconnect@0.4.2
│ └── arweave@1.11.4 deduped
└─┬ smartweave@0.4.48
└── arweave@1.11.4 deduped

Must be something very basic I miss here.
Thank you.

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

No branches or pull requests

1 participant