fix bug where add new price feed doesnt work (#571)

This commit is contained in:
Daniel Chew 2023-02-09 13:55:07 +09:00 committed by GitHub
parent d52f4d406e
commit 881bf768fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -205,6 +205,7 @@ const General = () => {
const jsonParsed = JSON.parse(json) const jsonParsed = JSON.parse(json)
Object.keys(jsonParsed).forEach((symbol) => { Object.keys(jsonParsed).forEach((symbol) => {
if ( if (
existingSymbols.has(symbol) &&
jsonParsed[symbol].address && jsonParsed[symbol].address &&
jsonParsed[symbol].address !== data[symbol].address jsonParsed[symbol].address !== data[symbol].address
) { ) {
@ -218,6 +219,7 @@ const General = () => {
// check if json keys "priceAccounts" key "address" key is changed // check if json keys "priceAccounts" key "address" key is changed
Object.keys(jsonParsed).forEach((symbol) => { Object.keys(jsonParsed).forEach((symbol) => {
if ( if (
existingSymbols.has(symbol) &&
jsonParsed[symbol].priceAccounts[0] && jsonParsed[symbol].priceAccounts[0] &&
data[symbol].priceAccounts[0] && data[symbol].priceAccounts[0] &&
jsonParsed[symbol].priceAccounts[0].address && jsonParsed[symbol].priceAccounts[0].address &&