File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ export class PythOracleInstructionCoder implements InstructionCoder {
8989 throw new Error ( `Unknown method: ${ methodName } ` )
9090 }
9191
92- /// updProduct has its own format
92+ /// updProduct and addProduct have their own format
9393 if ( methodName === 'updProduct' || methodName === 'addProduct' ) {
9494 let offset = 0
9595 for ( const key of Object . keys ( ix . productMetadata ) ) {
@@ -101,7 +101,7 @@ export class PythOracleInstructionCoder implements InstructionCoder {
101101 if ( offset > MAX_METADATA_SIZE ) {
102102 throw new Error ( 'The metadata is too long' )
103103 }
104- const data = buffer . subarray ( 0 , MAX_METADATA_SIZE )
104+ const data = buffer . subarray ( 0 , offset )
105105 return Buffer . concat ( [ discriminator , data ] )
106106 } else {
107107 const len = layout . encode ( ix , buffer )
@@ -136,7 +136,7 @@ export class PythOracleInstructionCoder implements InstructionCoder {
136136 return null
137137 }
138138
139- /// updProduct has its own format
139+ /// updProduct and addProduct have their own format
140140 if ( decoder . name === 'updProduct' || decoder . name === 'addProduct' ) {
141141 const product : Product = { }
142142 let idx = 0
You can’t perform that action at this time.
0 commit comments