diff --git a/cadence/transactions/init.cdc b/cadence/transactions/init.cdc index 899bfd8..33bce21 100644 --- a/cadence/transactions/init.cdc +++ b/cadence/transactions/init.cdc @@ -1,5 +1,5 @@ transaction(code: String, key: String, initAccountsLabels: [String]) { prepare(acct: AuthAccount) { - acct.contracts.add(name: "FCL", code: code.decodeHex(), key: key, initAccountsLabels: initAccountsLabels) + acct.contracts.add(name: "FCL", code: code.utf8, key: key, initAccountsLabels: initAccountsLabels) } } diff --git a/src/init.ts b/src/init.ts index c94094d..294a5dd 100644 --- a/src/init.ts +++ b/src/init.ts @@ -60,7 +60,7 @@ export async function initializeWallet(config: { .send([ fcl.transaction(initTransaction), fcl.args([ - fcl.arg(Buffer.from(FCLContract, "utf8").toString("hex"), t.String), + fcl.arg(FCLContract, t.String), fcl.arg(encodeServiceKey(flowAccountPublicKey), t.String), fcl.arg(initAccountsLabels, t.Array(t.String)), ]),