From c5c1f07ccb7c4102a86dde91dad8da849fc762f8 Mon Sep 17 00:00:00 2001 From: bobinstein Date: Thu, 5 Sep 2024 18:45:36 -0400 Subject: [PATCH] docs: Updated Irys migration docs --- docs/src/docs/turbo/migrating.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/src/docs/turbo/migrating.md b/docs/src/docs/turbo/migrating.md index 65c9151..18d5961 100644 --- a/docs/src/docs/turbo/migrating.md +++ b/docs/src/docs/turbo/migrating.md @@ -63,7 +63,7 @@ Other flags may be used as normal All uploads to Arweave through Turbo are paid for using Turbo Credits. Turbo Credits can be purchased through the `fund` method in the Irys SDK when the Irys instance is set to use Turbo. Currently, Turbo supports purchasing Turbo Credits with Arweave tokens (AR), Eth, and Sol. ```typescript -const irys = async () => { +const getIrys = async () => { const token = "ethereum"; const irys = new Irys({ @@ -75,6 +75,7 @@ const irys = async () => { }; try { + const irys = getIrys() const fundTx = await irys.fund(irys.utils.toAtomic(0.05)); // converts 0.05 ETH to its equivalent in Wei console.log(`Successfully funded ${irys.utils.fromAtomic(fundTx.quantity)} ${irys.token}`); } catch (e) {