-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Balances can now be displayed in the desired currency. (#44)
* A Turkish language file has been added. Additionally, hardcoded values in some files have been made compatible with translations, and incorrect values have been corrected. * Balances are now displayed in your desired currency. Users can select their preferred currency from Settings > General > Currencies. The language file has been updated. * Tests fixed. * update version Signed-off-by: Ruben <rubdeivis@gmail.com> --------- Signed-off-by: Ruben <rubdeivis@gmail.com> Co-authored-by: Ruben <rubdeivis@gmail.com>
- Loading branch information
Showing
19 changed files
with
179 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import CurrencySetting from "./CurrencySetting"; | ||
import {CURRENCIES} from "@utils/constants"; | ||
import {expect} from "vitest"; | ||
|
||
describe("CurrencySettings",()=>{ | ||
beforeAll(()=>{ | ||
vi.mock("./Settings.ts",()=> { | ||
class Setting {} | ||
|
||
return { | ||
default:Setting, | ||
}; | ||
}); | ||
}); | ||
it("should get default currency",()=>{ | ||
const result = CurrencySetting.getDefault(); | ||
expect(result).toEqual(CURRENCIES[0]); | ||
}) | ||
it("should get all languages",()=>{ | ||
const result = CurrencySetting.getCurrencies(); | ||
expect(result).toEqual(CURRENCIES); | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {CURRENCIES} from "@src/utils/constants"; | ||
import Setting from "./Setting"; | ||
|
||
export default class CurrencySetting extends Setting { | ||
static getDefault() { | ||
return CURRENCIES[0]; | ||
} | ||
|
||
static getCurrencies() { | ||
return CURRENCIES; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.