From 02c07d0c9367fb8e84559be872745ab489116bf3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Nov 2021 08:41:10 -0600 Subject: [PATCH] chore:(deps): bump @blockworks-foundation/mango-client from 3.1.1 to 3.2.7 in /explorer (#21384) * chore:(deps): bump @blockworks-foundation/mango-client in /explorer Bumps [@blockworks-foundation/mango-client](https://github.com/blockworks-foundation/mango-client-v3) from 3.1.1 to 3.2.7. - [Release notes](https://github.com/blockworks-foundation/mango-client-v3/releases) - [Commits](https://github.com/blockworks-foundation/mango-client-v3/commits) --- updated-dependencies: - dependency-name: "@blockworks-foundation/mango-client" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * fix compile errors Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Justin Starry --- explorer/package-lock.json | 14 ++++++------- explorer/package.json | 2 +- .../src/components/instruction/mango/types.ts | 20 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/explorer/package-lock.json b/explorer/package-lock.json index 0ddb2379a..8dda8def5 100644 --- a/explorer/package-lock.json +++ b/explorer/package-lock.json @@ -7,7 +7,7 @@ "": { "version": "0.1.0", "dependencies": { - "@blockworks-foundation/mango-client": "^3.1.1", + "@blockworks-foundation/mango-client": "^3.2.7", "@bonfida/bot": "^0.5.3", "@bonfida/spl-name-service": "^0.1.22", "@cloudflare/stream-react": "^1.2.0", @@ -1578,9 +1578,9 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "node_modules/@blockworks-foundation/mango-client": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@blockworks-foundation/mango-client/-/mango-client-3.1.1.tgz", - "integrity": "sha512-lZUSq5FbSBIwcJUNOM2oM6xR9OF5XXM/J82jaHRvltdneFOGlTbAHS78JgJwq8dDhUP7IkOKo49h76tItWKtDw==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@blockworks-foundation/mango-client/-/mango-client-3.2.7.tgz", + "integrity": "sha512-J16W652E8XVCA4E5oYJCo/opfpa33LtoA7n3S6qjl7MPsu6M5fzaSdxVltCjH9r4x5aKt9muDDQUzP4Yu9YyMw==", "dependencies": { "@project-serum/anchor": "^0.16.2", "@project-serum/serum": "0.13.55", @@ -28731,9 +28731,9 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "@blockworks-foundation/mango-client": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@blockworks-foundation/mango-client/-/mango-client-3.1.1.tgz", - "integrity": "sha512-lZUSq5FbSBIwcJUNOM2oM6xR9OF5XXM/J82jaHRvltdneFOGlTbAHS78JgJwq8dDhUP7IkOKo49h76tItWKtDw==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@blockworks-foundation/mango-client/-/mango-client-3.2.7.tgz", + "integrity": "sha512-J16W652E8XVCA4E5oYJCo/opfpa33LtoA7n3S6qjl7MPsu6M5fzaSdxVltCjH9r4x5aKt9muDDQUzP4Yu9YyMw==", "requires": { "@project-serum/anchor": "^0.16.2", "@project-serum/serum": "0.13.55", diff --git a/explorer/package.json b/explorer/package.json index 10e2be7f7..46a33c1fc 100644 --- a/explorer/package.json +++ b/explorer/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "@blockworks-foundation/mango-client": "^3.1.1", + "@blockworks-foundation/mango-client": "^3.2.7", "@bonfida/bot": "^0.5.3", "@bonfida/spl-name-service": "^0.1.22", "@cloudflare/stream-react": "^1.2.0", diff --git a/explorer/src/components/instruction/mango/types.ts b/explorer/src/components/instruction/mango/types.ts index 9f31e6a7f..de186276f 100644 --- a/explorer/src/components/instruction/mango/types.ts +++ b/explorer/src/components/instruction/mango/types.ts @@ -108,7 +108,7 @@ export type Deposit = { }; export const decodeDeposit = (ix: TransactionInstruction): Deposit => { - const decoded = MangoInstructionLayout.decode(ix.data); + const decoded = MangoInstructionLayout.decode(ix.data, 0); const deposit: Deposit = { quantity: decoded.Deposit.quantity.toNumber(), }; @@ -120,7 +120,7 @@ export type AddToBasket = { }; export const decodeAddToBasket = (ix: TransactionInstruction): AddToBasket => { - const decoded = MangoInstructionLayout.decode(ix.data); + const decoded = MangoInstructionLayout.decode(ix.data, 0); const addToBasket: AddToBasket = { marketIndex: decoded.AddToBasket.marketIndex.toNumber(), }; @@ -133,7 +133,7 @@ export type Withdraw = { }; export const decodeWithdraw = (ix: TransactionInstruction): Withdraw => { - const decoded = MangoInstructionLayout.decode(ix.data); + const decoded = MangoInstructionLayout.decode(ix.data, 0); const withdraw: Withdraw = { quantity: decoded.Withdraw.quantity.toNumber(), allowBorrow: decoded.Withdraw.allowBorrow.toString(), @@ -155,7 +155,7 @@ export type PlaceSpotOrder = { export const decodePlaceSpotOrder = ( ix: TransactionInstruction ): PlaceSpotOrder => { - const decoded = MangoInstructionLayout.decode(ix.data); + const decoded = MangoInstructionLayout.decode(ix.data, 0); const placeSpotOrder: PlaceSpotOrder = { side: decoded.PlaceSpotOrder.side.toString(), limitPrice: decoded.PlaceSpotOrder.limitPrice.toNumber(), @@ -178,7 +178,7 @@ export type CancelSpotOrder = { export const decodeCancelSpotOrder = ( ix: TransactionInstruction ): CancelSpotOrder => { - const decoded = MangoInstructionLayout.decode(ix.data); + const decoded = MangoInstructionLayout.decode(ix.data, 0); const cancelSpotOrder: CancelSpotOrder = { orderId: decoded.CancelSpotOrder.orderId.toString(), side: decoded.CancelSpotOrder.side.toString(), @@ -196,7 +196,7 @@ export type PlacePerpOrder = { export const decodePlacePerpOrder = ( ix: TransactionInstruction ): PlacePerpOrder => { - const decoded = MangoInstructionLayout.decode(ix.data); + const decoded = MangoInstructionLayout.decode(ix.data, 0); const placePerpOrder: PlacePerpOrder = { price: decoded.PlacePerpOrder.price.toNumber(), quantity: decoded.PlacePerpOrder.quantity.toNumber(), @@ -216,7 +216,7 @@ export type CancelPerpOrder = { export const decodeCancelPerpOrder = ( ix: TransactionInstruction ): CancelPerpOrder => { - const decoded = MangoInstructionLayout.decode(ix.data); + const decoded = MangoInstructionLayout.decode(ix.data, 0); const cancelPerpOrder: CancelPerpOrder = { orderId: decoded.CancelPerpOrder.orderId.toString(), invalidIdOk: decoded.CancelPerpOrder.invalidIdOk.toString(), @@ -248,7 +248,7 @@ export type ChangePerpMarketParams = { export const decodeChangePerpMarketParams = ( ix: TransactionInstruction ): ChangePerpMarketParams => { - const decoded = MangoInstructionLayout.decode(ix.data); + const decoded = MangoInstructionLayout.decode(ix.data, 0); const changePerpMarketParams: ChangePerpMarketParams = { maintLeverageOption: decoded.ChangePerpMarketParams.maintLeverageOption, maintLeverage: decoded.ChangePerpMarketParams.maintLeverage.toString(), @@ -287,7 +287,7 @@ export type AddSpotMarket = { export const decodeAddSpotMarket = ( ix: TransactionInstruction ): AddSpotMarket => { - const decoded = MangoInstructionLayout.decode(ix.data); + const decoded = MangoInstructionLayout.decode(ix.data, 0); const addSpotMarket: AddSpotMarket = { marketIndex: decoded.AddSpotMarket.marketIndex.toNumber(), maintLeverage: decoded.AddSpotMarket.maintLeverage.toNumber(), @@ -318,7 +318,7 @@ export type AddPerpMarket = { export const decodeAddPerpMarket = ( ix: TransactionInstruction ): AddPerpMarket => { - const decoded = MangoInstructionLayout.decode(ix.data); + const decoded = MangoInstructionLayout.decode(ix.data, 0); const addPerpMarket: AddPerpMarket = { marketIndex: decoded.AddPerpMarket.marketIndex.toNumber(), maintLeverage: decoded.AddPerpMarket.maintLeverage.toNumber(),