diff --git a/BlueApp.ts b/BlueApp.ts index 8e6f42312..748148da0 100644 --- a/BlueApp.ts +++ b/BlueApp.ts @@ -236,12 +236,12 @@ export class AppStorage { * Database file is deterministically derived from encryption key. */ async getRealm() { - const tempFolderPath = RNFS.TemporaryDirectoryPath; // Path to temporary folder + const cacheFolderPath = RNFS.CachesDirectoryPath; // Path to cache folder const password = this.hashIt(this.cachedPassword || 'fyegjitkyf[eqjnc.lf'); const buf = Buffer.from(this.hashIt(password) + this.hashIt(password), 'hex'); const encryptionKey = Int8Array.from(buf); const fileName = this.hashIt(this.hashIt(password)) + '-wallettransactions.realm'; - const path = `${tempFolderPath}/${fileName}`; // Use temporary folder path + const path = `${cacheFolderPath}/${fileName}`; // Use cache folder path const schema = [ { @@ -270,7 +270,7 @@ export class AppStorage { * @returns {Promise} */ async openRealmKeyValue(): Promise { - const tempFolderPath = RNFS.TemporaryDirectoryPath; // Path to temporary folder + const cacheFolderPath = RNFS.CachesDirectoryPath; // Path to cache folder const service = 'realm_encryption_key'; let password; const credentials = await Keychain.getGenericPassword({ service }); @@ -284,7 +284,7 @@ export class AppStorage { const buf = Buffer.from(password, 'hex'); const encryptionKey = Int8Array.from(buf); - const path = `${tempFolderPath}/keyvalue.realm`; // Use temporary folder path + const path = `${cacheFolderPath}/keyvalue.realm`; // Use cache folder path const schema = [ { diff --git a/blue_modules/BlueElectrum.ts b/blue_modules/BlueElectrum.ts index 6f99651df..65de31d05 100644 --- a/blue_modules/BlueElectrum.ts +++ b/blue_modules/BlueElectrum.ts @@ -109,11 +109,11 @@ let _realm: Realm | undefined; async function _getRealm() { if (_realm) return _realm; - const tempFolderPath = RNFS.CachesDirectoryPath; // Path to temporary folder + const cacheFolderPath = RNFS.CachesDirectoryPath; // Path to cache folder const password = bitcoin.crypto.sha256(Buffer.from('fyegjitkyf[eqjnc.lf')).toString('hex'); const buf = Buffer.from(password + password, 'hex'); const encryptionKey = Int8Array.from(buf); - const path = `${tempFolderPath}/electrumcache.realm`; // Use temporary folder path + const path = `${cacheFolderPath}/electrumcache.realm`; // Use cache folder path const schema = [ { diff --git a/components/WalletsCarousel.js b/components/WalletsCarousel.js index ed71415e3..7f7c9db7d 100644 --- a/components/WalletsCarousel.js +++ b/components/WalletsCarousel.js @@ -227,7 +227,7 @@ export const WalletCarouselItem = ({ item, _, onPress, handleLongPress, isSelect {`${balance} `}