diff options
author | Florian Dold <florian@dold.me> | 2022-09-16 16:20:47 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-09-16 16:32:21 +0200 |
commit | b91caf977fad8da11e523ca3a39064dd86e04c64 (patch) | |
tree | 732e1543d2555094d7f9a9ca242309847c1a33a3 /packages/idb-bridge | |
parent | 2747bc260bc05418974570d04d7f999dfc988cda (diff) |
wallet-core: support age restrictions in new coin selection
Diffstat (limited to 'packages/idb-bridge')
-rw-r--r-- | packages/idb-bridge/src/index.ts | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/packages/idb-bridge/src/index.ts b/packages/idb-bridge/src/index.ts index c4dbb8281..825d41f5e 100644 --- a/packages/idb-bridge/src/index.ts +++ b/packages/idb-bridge/src/index.ts @@ -20,7 +20,7 @@ import { ObjectStoreRecord, MemoryBackendDump, } from "./MemoryBackend"; -import { Event } from "./idbtypes"; +import { Event, IDBKeyRange } from "./idbtypes"; import { BridgeIDBCursor, BridgeIDBDatabase, @@ -90,6 +90,17 @@ export type { AccessStats } from "./MemoryBackend"; })(); /** + * Global indexeddb objects, either from the native or bridge-idb + * implementation, depending on what is availabe in + * the global environment. + */ +export const GlobalIDB: { + KeyRange: typeof BridgeIDBKeyRange; +} = { + KeyRange: (globalThis as any).IDBKeyRange ?? BridgeIDBKeyRange, +}; + +/** * Populate the global name space such that the given IndexedDB factory is made * available globally. * |