@bsv/wallet-toolbox 1.4.4 → 1.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsv/wallet-toolbox",
3
- "version": "1.4.4",
3
+ "version": "1.4.6",
4
4
  "description": "BRC100 conforming wallet, wallet storage and wallet signer components",
5
5
  "main": "./out/src/index.js",
6
6
  "types": "./out/src/index.d.ts",
@@ -1870,7 +1870,7 @@ export class CWIStyleWalletManager implements WalletInterface {
1870
1870
  while (!this.authenticated || !this.underlying) {
1871
1871
  await new Promise(resolve => setTimeout(resolve, 100))
1872
1872
  }
1873
- return { authenticated: true }
1873
+ return await this.underlying.waitForAuthentication({}, originator)
1874
1874
  }
1875
1875
 
1876
1876
  async getHeight(_: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetHeightResult> {
@@ -502,8 +502,8 @@ describe('CWIStyleWalletManager Tests', () => {
502
502
 
503
503
  test('waitForAuthentication() eventually resolves', async () => {
504
504
  // Already authenticated from beforeEach. So it should immediately return.
505
- const result = await manager.waitForAuthentication({}, 'normal.com')
506
- expect(result).toEqual({ authenticated: true })
505
+ await manager.waitForAuthentication({}, 'normal.com')
506
+ expect(mockUnderlyingWallet.waitForAuthentication).toHaveBeenCalledTimes(1)
507
507
  })
508
508
  })
509
509
  describe('Additional Tests for Password Retriever Callback, Privileged Key Expiry, and UMP Token Serialization', () => {
@@ -36,6 +36,7 @@ describe('storage adminStats tests', () => {
36
36
  })
37
37
 
38
38
  test('0 adminStats StorageKnex', async () => {
39
+ storage.setServices(setup.services)
39
40
  const r = await storage.adminStats(env.identityKey)
40
41
  console.log(Format.toLogStringAdminStats(r))
41
42
  expect(r.requestedBy).toBe(env.identityKey)