Skip to content

Commit

Permalink
improve logging for ownership acceptance (#426)
Browse files Browse the repository at this point in the history
* use proposed owner for logging in acceptOwnership

* handle potential undefined proposedOwner

* more logging for validation on acceptFeedOwnership

* fix: log contract address - not 'address'
  • Loading branch information
aalu1418 committed Nov 11, 2022
1 parent 0fa7d3a commit aa66b27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -56,7 +56,7 @@ export const makeAcceptOwnershipCommand = (
logger.info(`Accepting Ownership of contract of type "${contract.type}":
- Contract: ${contract.address} ${contract.description ? '- ' + contract.description : ''}
- Current Owner: ${ownership.owner.toString()}
- Next Owner (Current signer): ${this.wallet.publicKey}`)
- Next Owner (proposed): ${ownership.proposedOwner?.toString()}`)
await prompt('Continue?')
}

Expand Down
Expand Up @@ -26,6 +26,9 @@ export default class AcceptFeedOwnership extends SolanaCommand {
// Need to resolve feed.proposedOwner. This will either match signer
// store with store.owner == signer. If not, the instruction will error
const feedAccount = (await program.account.transmissions.fetch(state)) as any
logger.info(`Ownership details for feed ${address}:
- Current Owner: ${feedAccount.owner.toString()}
- Next Owner (proposed): ${feedAccount.proposedOwner?.toString()}`)

const tx = await program.methods
.acceptFeedOwnership()
Expand Down

0 comments on commit aa66b27

Please sign in to comment.