Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"prepublishOnly": "npm run build"
},
"peerDependencies": {
"@norbix.ai/ts": ">=4.31.0",
"@norbix.ai/ts": ">=4.32.0",
"@reduxjs/toolkit": ">=2.0.0",
"react": ">=18.0.0",
"react-redux": ">=9.0.0"
Expand All @@ -68,7 +68,7 @@
"@commitlint/cli": "^21.2.2",
"@commitlint/config-conventional": "^21.2.2",
"@eslint/js": "^10.0.1",
"@norbix.ai/ts": "^4.31.0",
"@norbix.ai/ts": "^4.32.0",
"@reduxjs/toolkit": "^2.12.0",
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/github": "^12.0.9",
Expand Down
22 changes: 22 additions & 0 deletions tests/payments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,28 @@ describe('hubPayments', () => {
expect(endpoints.getPaymentsWebhookLog.providesTags).toEqual(['PaymentIntegrations']);
expect(calls).toEqual([{ method: 'hub.getPaymentsWebhookLog', args }]);
});

/**
* Montonio `isSandbox` is optional since core SDK 4.32.0: empty = true on the
* gateway (sandbox). The hook must hand the caller's integration over as is,
* never fill the switch in.
*/
it('savePaymentsIntegration leaves an unset Montonio isSandbox out', async () => {
const { calls, client } = fakeNorbix();
const args = {
integration: {
provider: 'Montonio',
integrationName: 'montonio',
accessKey: 'ak',
secretKey: 'sk',
},
};

await endpoints.savePaymentsIntegration.query(args)(client);

expect(calls).toEqual([{ method: 'hub.savePaymentsIntegration', args }]);
expect('isSandbox' in (calls[0]!.args as typeof args).integration).toBe(false);
});
});

/**
Expand Down