Add CHF rate

This commit is contained in:
minibits-cash
2026-03-28 23:19:09 +01:00
parent e4feaca4f8
commit c67b48993f
7 changed files with 17 additions and 7 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ android {
applicationId "com.minibits_wallet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 58070
versionCode 58071
versionName "0.4.0"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "minibits_wallet",
"version": "0.4.0-beta.5",
"version": "0.4.0-beta.6",
"private": true,
"scripts": {
"android:clean": "cd android && ./gradlew clean",
+1
View File
@@ -0,0 +1 @@
export const ChfIcon = `<svg fill="#ff0000" height="200px" width="200px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 329 329" xml:space="preserve" stroke="#ff0000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M164.5,0C73.794,0,0,73.794,0,164.5S73.794,329,164.5,329S329,255.206,329,164.5S255.206,0,164.5,0z M222.453,110.832 c0,1.657-1.343,3-3,3h-66.406v28.682h49.752c1.657,0,3,1.343,3,3v23c0,1.657-1.343,3-3,3h-49.752v23h14.5c1.657,0,3,1.343,3,3v18 c0,1.657-1.343,3-3,3h-14.5v17.654c0,1.657-1.343,3-3,3h-23c-1.657,0-3-1.343-3-3v-17.654h-14.5c-1.657,0-3-1.343-3-3v-18 c0-1.657,1.343-3,3-3h14.5V87.832c0-1.657,1.343-3,3-3h92.406c1.657,0,3,1.343,3,3V110.832z"></path> </g></svg>`
+1 -1
View File
@@ -28,7 +28,7 @@ import { Proof } from './Proof'
import { InFlightRequest, Mint } from './Mint'
import { getRootStore } from './helpers/getRootStore'
import { Transaction } from './Transaction'
// refresh refresh
// refresh
/*
Not persisted, in-memory only model of the cashu-ts wallet instances and wallet keys persisted in the device secure store.
+1 -1
View File
@@ -34,7 +34,7 @@ import RNExitApp from 'react-native-exit-app'
import { TransactionStatus } from '../models/Transaction'
import { maxTransactionsInHistory } from '../models/TransactionsStore'
import { StaticScreenProps, useNavigation } from '@react-navigation/native'
// refresh refresh
// refresh
type Props = StaticScreenProps<undefined>
+1 -1
View File
@@ -18,7 +18,7 @@ import { Platform } from "react-native"
import AppError, { Err } from "../utils/AppError"
const { userSettingsStore } = rootStoreInstance
// refresh refresh
// refresh
if (!__DEV__) {
Sentry.init({
+11 -2
View File
@@ -2,6 +2,7 @@ import numbro from 'numbro'
import { BtcIcon, EurIcon, UsdIcon, CadIcon, GbpIcon } from '../../components'
import AppError, { Err } from '../../utils/AppError'
import { ExchangeRate } from '../../models/WalletStore'
import { ChfIcon } from '../../components/ChfIcon'
export type MintUnit = typeof MintUnits[number]
@@ -11,7 +12,7 @@ export const MintUnits = ['btc', 'sat', 'msat', 'usd', 'eur'] as const
export enum CurrencyCode {
BTC = 'BTC', SAT = 'SAT', MSAT = 'MSAT', EUR = 'EUR', GBP = 'GBP',
CZK = 'CZK', USD = 'USD', PLN = 'PLN', HUF = 'HUF', RON = 'RON',
CAD = 'CAD'
CAD = 'CAD', CHF = 'CHF', JPY = 'JPY', AUD = 'AUD', SEK = 'SEK', NOK = 'NOK',
}
export type MintUnitCurrencyPair = {
@@ -19,7 +20,7 @@ export type MintUnitCurrencyPair = {
}
/** add any currency codes you want to allow the user to select as "reference currency" in the app settings, here: */
export const availableExchangeCurrencies = [CurrencyCode.USD, CurrencyCode.EUR, CurrencyCode.CAD, CurrencyCode.GBP] as const;
export const availableExchangeCurrencies = [CurrencyCode.USD, CurrencyCode.EUR, CurrencyCode.CAD, CurrencyCode.GBP, CurrencyCode.CHF] as const;
export const MintUnitCurrencyPairs: MintUnitCurrencyPair = {
btc:CurrencyCode.BTC, sat:CurrencyCode.SAT, msat:CurrencyCode.MSAT, eur:CurrencyCode.EUR, usd:CurrencyCode.USD,
@@ -127,6 +128,14 @@ export const Currencies: CurrencyList = {
precision: 100,
mantissa: 2,
},
CHF: {
symbol: 'CHF',
title: 'Swiss franc',
code: CurrencyCode.CHF,
icon: ChfIcon,
precision: 100,
mantissa: 2,
},
} as const