diff --git a/CHANGELOG.md b/CHANGELOG.md index fff7cd6..f62587b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.0.1-alpha.85](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.84...v0.0.1-alpha.85) (2024-09-25) + + +### Bug Fixes + +* load mnemonic ([809f263](https://github.com/DIG-Network/dig-chia-sdk/commit/809f263632822a3b78d30a27142c9d91d9d1e17c)) + ### [0.0.1-alpha.84](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.83...v0.0.1-alpha.84) (2024-09-25) diff --git a/package-lock.json b/package-lock.json index 558da00..26c16b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.84", + "version": "0.0.1-alpha.85", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.84", + "version": "0.0.1-alpha.85", "license": "ISC", "dependencies": { "@dignetwork/datalayer-driver": "^0.1.25", diff --git a/package.json b/package.json index b506be6..abecac8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.84", + "version": "0.0.1-alpha.85", "description": "", "type": "commonjs", "main": "./dist/index.js", diff --git a/src/blockchain/Wallet.ts b/src/blockchain/Wallet.ts index 169e8cc..ff3027a 100644 --- a/src/blockchain/Wallet.ts +++ b/src/blockchain/Wallet.ts @@ -26,6 +26,8 @@ import { } from "@dignetwork/datalayer-driver"; import { MIN_HEIGHT, MIN_HEIGHT_HEADER_HASH } from "../utils/config"; import { FileCache } from "../utils/FileCache"; +import { USER_DIR_PATH } from "../utils/config"; +import path from "path"; const KEYRING_FILE = "keyring.json"; const CACHE_DURATION = 5 * 60 * 1000; // 5 minutes @@ -210,7 +212,7 @@ export class Wallet { feeBigInt: bigint, omitCoins: Coin[] = [] ): Promise { - const cache = new FileCache<{ coinId: string; expiry: number }>("reserved_coins"); + const cache = new FileCache<{ coinId: string; expiry: number }>(path.join(USER_DIR_PATH, "reserved_coins")); const cachedReservedCoins = cache.getCachedKeys(); const now = Date.now(); const omitCoinIds = omitCoins.map((coin) => getCoinId(coin).toString("hex"));