Skip to content

Commit

Permalink
feat: update node-api and client.
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitdevos committed Nov 9, 2023
1 parent 950c7c4 commit 6fde79a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 27 deletions.
3 changes: 3 additions & 0 deletions src/__mocks__/LogionMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const CLOSED_IDENTITY_LOC: LegalOfficerCase = {
links: [],
collectionCanUpload: false,
valueFee: 0n,
legalFee: 0n,
collectionItemFee: 0n,
tokensRecordFee: 0n,
}
Expand All @@ -84,6 +85,7 @@ export const OPEN_IDENTITY_LOC: LegalOfficerCase = {
links: [],
collectionCanUpload: false,
valueFee: 0n,
legalFee: 0n,
collectionItemFee: 0n,
tokensRecordFee: 0n,
}
Expand All @@ -100,6 +102,7 @@ export const CLOSED_COLLECTION_LOC: LegalOfficerCase = {
links: [],
collectionCanUpload: false,
valueFee: 100n,
legalFee: 200n,
collectionItemFee: 50n,
tokensRecordFee: 40n,
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("LocRequestAcceptance", () => {

setupApiMock(api => {
const submittable = mockSubmittable();
api.setup(instance => instance.polkadot.tx.logionLoc.createPolkadotTransactionLoc(It.IsAny(), It.IsAny(), null, It.IsAny())).returns(submittable.object());
api.setup(instance => instance.polkadot.tx.logionLoc.createPolkadotTransactionLoc(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())).returns(submittable.object());
const fees = new Mock<Fees>();
api.setup(instance => instance.fees.estimateCreateLoc(It.IsAny())).returnsAsync(fees.object());
});
Expand Down Expand Up @@ -70,7 +70,7 @@ describe("LocRequestAcceptance", () => {

setupApiMock(api => {
const submittable = mockSubmittable();
api.setup(instance => instance.polkadot.tx.logionLoc.createCollectionLoc(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), null, It.IsAny(), It.IsAny(), It.IsAny())).returns(submittable.object());
api.setup(instance => instance.polkadot.tx.logionLoc.createCollectionLoc(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())).returns(submittable.object());
const fees = new Mock<Fees>();
api.setup(instance => instance.fees.estimateCreateLoc(It.IsAny())).returnsAsync(fees.object());
});
Expand Down
14 changes: 7 additions & 7 deletions src/loc/__snapshots__/ContextualizedLocDetails.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`ContextualizedLocDetails renders 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -59,7 +59,7 @@ exports[`ContextualizedLocDetails renders 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -121,7 +121,7 @@ exports[`ContextualizedLocDetails renders 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -179,7 +179,7 @@ exports[`ContextualizedLocDetails renders 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -230,7 +230,7 @@ exports[`ContextualizedLocDetails renders 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -281,7 +281,7 @@ exports[`ContextualizedLocDetails renders 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -336,7 +336,7 @@ exports[`ContextualizedLocDetails renders 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down
20 changes: 10 additions & 10 deletions src/loc/__snapshots__/UserContextualizedLocDetails.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`UserContextualizedLocDetails renders for requester 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -90,7 +90,7 @@ exports[`UserContextualizedLocDetails renders for requester 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -143,7 +143,7 @@ exports[`UserContextualizedLocDetails renders for requester 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -195,7 +195,7 @@ exports[`UserContextualizedLocDetails renders for requester 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -246,7 +246,7 @@ exports[`UserContextualizedLocDetails renders for requester 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -307,7 +307,7 @@ exports[`UserContextualizedLocDetails renders for verified issuer 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -388,7 +388,7 @@ exports[`UserContextualizedLocDetails renders for verified issuer 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -441,7 +441,7 @@ exports[`UserContextualizedLocDetails renders for verified issuer 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -493,7 +493,7 @@ exports[`UserContextualizedLocDetails renders for verified issuer 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down Expand Up @@ -544,7 +544,7 @@ exports[`UserContextualizedLocDetails renders for verified issuer 1`] = `
"description": "Description",
"fees": Object {
"collectionItemFee": 0n,
"legalFee": undefined,
"legalFee": 0n,
"tokensRecordFee": 0n,
"valueFee": 0n,
},
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2986,14 +2986,14 @@ __metadata:
linkType: hard

"@logion/client@npm:^0.34.0-1":
version: 0.34.0-5
resolution: "@logion/client@npm:0.34.0-5"
version: 0.34.0-6
resolution: "@logion/client@npm:0.34.0-6"
dependencies:
"@logion/node-api": ^0.25.0-2
"@logion/node-api": ^0.25.0-4
axios: ^0.27.2
luxon: ^3.0.1
mime-db: ^1.52.0
checksum: 9ddf6144f49f69ca85a3fa91937f66d26e193dbb181000360f02fb28765d60ce1e5c3df1c0ca8b431bdbbde2c6287f698d81a8cbde594a3f3c4625b1495c1241
checksum: bdb978edfb4546ac8cbc9587df551318272e8a85b758a988b40d53e64b39c58e2484b2b26650a6a9a0a472e56e890c221736792864acb45595bca476b115281e
languageName: node
linkType: hard

Expand Down Expand Up @@ -3035,17 +3035,17 @@ __metadata:
languageName: node
linkType: hard

"@logion/node-api@npm:^0.25.0-2":
version: 0.25.0-3
resolution: "@logion/node-api@npm:0.25.0-3"
"@logion/node-api@npm:^0.25.0-4":
version: 0.25.0-4
resolution: "@logion/node-api@npm:0.25.0-4"
dependencies:
"@polkadot/api": ^10.10.1
"@polkadot/util": ^12.5.1
"@polkadot/util-crypto": ^12.5.1
"@types/uuid": ^9.0.2
fast-sha256: ^1.3.0
uuid: ^9.0.0
checksum: 4a57b234698f6b69014317871f7db69e757fa671eb75c47cd714c7ebd9ead692a82b6b39f54deb3af42501b224f0f9cf1158ad70dd4d7998ecfc2a1507f5a746
checksum: 5a69a3b338433eb5764674e87532b55a11160f04161869c8795a582dfd463f63d736afcff8b044ba619661e9891ebbe8bdf778f06b9eaf14fac494b566b60fbb
languageName: node
linkType: hard

Expand Down

0 comments on commit 6fde79a

Please sign in to comment.