Ver Fonte

Allow changing the symbol (#1075)

* Allow changing the symbol

* Format
guibescos há 2 anos atrás
pai
commit
4bfa1c38f6

+ 1 - 2
governance/xc_admin/packages/xc_admin_frontend/components/tabs/General.tsx

@@ -442,7 +442,7 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
             // create update product account instruction
             instructions.push(
               await pythProgramClient.methods
-                .updProduct({ ...newChanges.metadata, symbol: symbol })
+                .updProduct({ symbol, ...newChanges.metadata }) // If there's a symbol in newChanges.metadata, it will overwrite the current symbol
                 .accounts({
                   fundingAccount,
                   productAccount: new PublicKey(prev.address),
@@ -547,7 +547,6 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
 
   const MetadataChangesRows = ({ changes }: { changes: any }) => {
     const addPriceFeed = changes.prev === undefined && changes.new !== undefined
-
     return (
       <>
         {Object.keys(changes.new).map(