Display symbol for new price feeds (#616)

This commit is contained in:
guibescos 2023-02-21 04:42:38 +01:00 committed by GitHub
parent 562a5cd0fa
commit 6f49dfbb4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -175,6 +175,10 @@ const General = () => {
// if symbol is not in existing symbols, create new entry // if symbol is not in existing symbols, create new entry
changes[symbol] = { new: {} } changes[symbol] = { new: {} }
changes[symbol].new = { ...fileDataParsed[symbol] } changes[symbol].new = { ...fileDataParsed[symbol] }
changes[symbol].new.metadata = {
...changes[symbol].new.metadata,
symbol,
}
// these fields are generated deterministically and should not be updated // these fields are generated deterministically and should not be updated
delete changes[symbol].new.address delete changes[symbol].new.address
delete changes[symbol].new.priceAccounts[0].address delete changes[symbol].new.priceAccounts[0].address
@ -276,7 +280,7 @@ const General = () => {
// create add product account instruction // create add product account instruction
instructions.push( instructions.push(
await pythProgramClient.methods await pythProgramClient.methods
.addProduct({ ...newChanges.metadata, symbol: symbol }) .addProduct({ ...newChanges.metadata })
.accounts({ .accounts({
fundingAccount, fundingAccount,
tailMappingAccount: rawConfig.mappingAccounts[0].address, tailMappingAccount: rawConfig.mappingAccounts[0].address,