Skip to content

Commit b0d380c

Browse files
fix: 🐛 Use getLegsFromChain for getting legs after creation
1 parent eb1ea7a commit b0d380c

8 files changed

+10
-9
lines changed

AccountsService

Whitespace-only changes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@polymeshassociation/fireblocks-signing-manager": "^2.5.0",
5050
"@polymeshassociation/hashicorp-vault-signing-manager": "^3.4.0",
5151
"@polymeshassociation/local-signing-manager": "^3.3.0",
52-
"@polymeshassociation/polymesh-sdk": "27.0.0-alpha.4",
52+
"@polymeshassociation/polymesh-sdk": "^27.0.0-alpha.5",
5353
"@polymeshassociation/signing-manager-types": "^3.2.0",
5454
"class-transformer": "0.5.1",
5555
"class-validator": "^0.14.0",

src/settlements/settlements.controller.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ describe('SettlementsController', () => {
329329
it('should create an instruction and return the data returned by the service', async () => {
330330
const mockInstruction = new MockInstruction();
331331

332-
when(mockInstruction.getLegs).calledWith().mockResolvedValue({ data: [] });
332+
when(mockInstruction.getLegsFromChain).calledWith().mockResolvedValue({ data: [] });
333333

334334
const mockData = {
335335
...txResult,

src/settlements/settlements.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ export class SettlementsController {
410410
transactions,
411411
details,
412412
}) => {
413-
const { data: legs } = await instruction.getLegs();
413+
const { data: legs } = await instruction.getLegsFromChain();
414414

415415
return new CreatedInstructionModel({
416416
instruction,

src/settlements/venues.controller.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe('VenuesController', () => {
9191
it('should create an instruction and return the data returned by the service', async () => {
9292
const mockInstruction = new MockInstruction();
9393

94-
when(mockInstruction.getLegs).calledWith().mockResolvedValue({ data: [] });
94+
when(mockInstruction.getLegsFromChain).calledWith().mockResolvedValue({ data: [] });
9595

9696
const mockData = {
9797
...txResult,

src/settlements/venues.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export class VenuesController {
186186
transactions,
187187
details,
188188
}) => {
189-
const { data: legs } = await instruction.getLegs();
189+
const { data: legs } = await instruction.getLegsFromChain();
190190

191191
return new CreatedInstructionModel({
192192
instruction,

src/test-utils/mocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ export class MockInstruction {
264264
public reject = jest.fn();
265265
public details = jest.fn();
266266
public getLegs = jest.fn();
267+
public getLegsFromChain = jest.fn();
267268
public getAffirmations = jest.fn();
268269
public getOffChainAffirmations = jest.fn();
269270
public getOffChainAffirmationForLeg = jest.fn();

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,10 +1954,10 @@
19541954
dependencies:
19551955
"@polymeshassociation/signing-manager-types" "^3.3.0"
19561956

1957-
"@polymeshassociation/[email protected].4":
1958-
version "27.0.0-alpha.4"
1959-
resolved "https://registry.yarnpkg.com/@polymeshassociation/polymesh-sdk/-/polymesh-sdk-27.0.0-alpha.4.tgz#999da175d0fed8e075a34fe58fc3b5dd108cdd0b"
1960-
integrity sha512-i/FT36KsdeKntKpVD6V+H+MszTog0yC6JDM/tbRtZls71wmZClfMz1jC4ihdnfF02+DVlKvKWH1oEIv1AImJgg==
1957+
"@polymeshassociation/polymesh-sdk@^27.0.0-alpha.5":
1958+
version "27.0.0-alpha.5"
1959+
resolved "https://registry.yarnpkg.com/@polymeshassociation/polymesh-sdk/-/polymesh-sdk-27.0.0-alpha.5.tgz#0e8c1318d0632c535ffa5e89808dcfdb03440578"
1960+
integrity sha512-Dgb9vz9c7O+gzuZX+TSx62N/UPeO3TyqkdJ2lF+S6xxDpswBPhWvBtpxwFTyHYnOrBFlXG4APLy5C2T+1526bw==
19611961
dependencies:
19621962
"@apollo/client" "^3.8.1"
19631963
"@polkadot/api" "11.2.1"

0 commit comments

Comments
 (0)