Skip to content

Commit fd4a300

Browse files
committed
fix: debug logger shows correct auth version
CE-10122
1 parent 76129fd commit fd4a300

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

modules/sdk-api/src/bitgoAPI.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ export class BitGoAPI implements BitGoBase {
412412

413413
req.set('Authorization', 'Bearer ' + requestProperties.tokenHash);
414414
debug(
415-
'sending v2 %s request to %s with token %s',
415+
'sending v%d %s request to %s with token %s',
416+
this._authVersion,
416417
method,
417418
url,
418419
this._token?.substr(0, 8) ?? '(strategy-managed)'

modules/sdk-api/test/unit/hmacStrategy.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,10 @@ describe('BitGoAPI HMAC Strategy Injection', function () {
156156
}
157157
);
158158

159-
try {
160-
await bitgo.authenticate({
161-
username: 'test@test.com',
162-
password: 'mypassword',
163-
});
164-
} catch {
165-
// Authentication may fail for various reasons in this test context,
166-
// but we only care that the strategy was called for password HMAC.
167-
}
159+
await bitgo.authenticate({
160+
username: 'test@test.com',
161+
password: 'mypassword',
162+
});
168163

169164
strategy.calculateHMACCalls.length.should.be.greaterThan(0);
170165
const hmacCall = strategy.calculateHMACCalls[0];

0 commit comments

Comments
 (0)