Skip to content

Commit 3638fc7

Browse files
authored
Replace contract source encoding to utf8 (#218)
1 parent 6bd0714 commit 3638fc7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

cadence/transactions/init.cdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
transaction(code: String, key: String, initAccountsLabels: [String]) {
22
prepare(acct: AuthAccount) {
3-
acct.contracts.add(name: "FCL", code: code.decodeHex(), key: key, initAccountsLabels: initAccountsLabels)
3+
acct.contracts.add(name: "FCL", code: code.utf8, key: key, initAccountsLabels: initAccountsLabels)
44
}
55
}

src/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export async function initializeWallet(config: {
6060
.send([
6161
fcl.transaction(initTransaction),
6262
fcl.args([
63-
fcl.arg(Buffer.from(FCLContract, "utf8").toString("hex"), t.String),
63+
fcl.arg(FCLContract, t.String),
6464
fcl.arg(encodeServiceKey(flowAccountPublicKey), t.String),
6565
fcl.arg(initAccountsLabels, t.Array(t.String)),
6666
]),

0 commit comments

Comments
 (0)