From 5bed50a03d7b67dc6ec03137214fbbb7c7037e14 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sun, 8 Dec 2024 14:49:42 +0400 Subject: [PATCH] Debug tx error --- cadence/transactions/create_play.cdc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cadence/transactions/create_play.cdc b/cadence/transactions/create_play.cdc index d9cc348..c0bce3a 100644 --- a/cadence/transactions/create_play.cdc +++ b/cadence/transactions/create_play.cdc @@ -3,9 +3,9 @@ import "TopShot" transaction { let admin: &TopShot.Admin - prepare(acct: AuthAccount) { + prepare(signer: auth(Storage) &Account) { // Borrow the Admin resource from the specified storage path - self.admin = acct.borrow<&TopShot.Admin>(from: /storage/TopShotAdmin) + self.admin = signer.storage.borrow<&TopShot.Admin>(from: /storage/TopShotAdmin) ?? panic("Cannot borrow admin resource") }