Skip to content

Commit ca1a03b

Browse files
authored
Add product in one step (#586)
1 parent 66a46dd commit ca1a03b

File tree

3 files changed

+11
-20
lines changed

3 files changed

+11
-20
lines changed

governance/xc_admin/packages/xc_admin_frontend/components/tabs/General.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -266,24 +266,15 @@ const General = () => {
266266
// create add product account instruction
267267
instructions.push(
268268
await pythProgramClient.methods
269-
.addProduct()
269+
.addProduct({ ...newChanges.metadata, symbol: symbol })
270270
.accounts({
271271
fundingAccount,
272272
tailMappingAccount: rawConfig.mappingAccounts[0].address,
273273
productAccount: productAccountKey,
274274
})
275275
.instruction()
276276
)
277-
// create update product account instruction
278-
instructions.push(
279-
await pythProgramClient.methods
280-
.updProduct({ ...newChanges.metadata, symbol: symbol })
281-
.accounts({
282-
fundingAccount,
283-
productAccount: productAccountKey,
284-
})
285-
.instruction()
286-
)
277+
287278
// deterministically generate price account key
288279
const priceAccountKey = await PublicKey.createWithSeed(
289280
OPS_KEY,

governance/xc_admin/packages/xc_admin_frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@coral-xyz/anchor": "^0.26.0",
1313
"@headlessui/react": "^1.7.7",
14-
"@pythnetwork/client": "^2.12.0",
14+
"@pythnetwork/client": "^2.15.0",
1515
"@solana/wallet-adapter-base": "^0.9.20",
1616
"@solana/wallet-adapter-react": "^0.15.28",
1717
"@solana/wallet-adapter-react-ui": "^0.9.27",

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)