Skip to content

Commit

Permalink
Replace contract source encoding to utf8 (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
nozim authored Sep 28, 2023
1 parent 6bd0714 commit 3638fc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cadence/transactions/init.cdc
Original file line number Diff line number Diff line change
@@ -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)
}
}
2 changes: 1 addition & 1 deletion src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
]),
Expand Down

0 comments on commit 3638fc7

Please sign in to comment.