diff --git a/.changeset/cyan-forks-rest.md b/.changeset/cyan-forks-rest.md new file mode 100644 index 000000000..172f95297 --- /dev/null +++ b/.changeset/cyan-forks-rest.md @@ -0,0 +1,5 @@ +--- +"@onflow/sdk": patch +--- + +Use keyID from signatures diff --git a/packages/sdk/src/resolve/resolve-signatures.js b/packages/sdk/src/resolve/resolve-signatures.js index f6d37836c..e5131f5f0 100644 --- a/packages/sdk/src/resolve/resolve-signatures.js +++ b/packages/sdk/src/resolve/resolve-signatures.js @@ -39,9 +39,12 @@ function fetchSignature(ix, payload) { return async function innerFetchSignature(id) { const acct = ix.accounts[id] if (acct.signature != null) return - const {signature} = await acct.signingFunction( + const { signature, keyId } = await acct.signingFunction( buildSignable(acct, payload, ix) ) + if (!acct.role.proposer) { + ix.accounts[id].keyId = keyId + } ix.accounts[id].signature = signature } }