Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

fix: set oracle admin explicitly in feedconfig oracles #102

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mattsse
Copy link
Contributor

@mattsse mattsse commented Aug 12, 2021

the createFeed was invoked with [Account] instead of [[Account, Account]] causing some tuple encoding issues so that, 111111111111111111111111111111111HC1 was set as the oracle's admin. This is definitely a polkadotjs/Tuple thing.
I fixed this by setting each of the oracle's admin to the palletAdmin

@mattsse mattsse requested a review from ebarakos August 12, 2021 10:09
Comment on lines +44 to +46
// make the pallet admin also the oracle admin
const palletAdmin = await api.query.chainlinkFeed.palletAdmin();
feedConfig.oracles = feedConfig.oracles.map(oracle => [oracle, palletAdmin]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattsse let's make the oracle admin same as the oracle, same as the original intention

Suggested change
// make the pallet admin also the oracle admin
const palletAdmin = await api.query.chainlinkFeed.palletAdmin();
feedConfig.oracles = feedConfig.oracles.map(oracle => [oracle, palletAdmin]);
feedConfig.oracles = feedConfig.oracles.map(oracle => [oracle, oracle]);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants