diff --git a/.env.mainnet b/.env.mainnet new file mode 100644 index 00000000..4e3e46bc --- /dev/null +++ b/.env.mainnet @@ -0,0 +1,14 @@ +# Mainnet + +VITE_NETWORK="bitcoin" +VITE_PROXY="wss://p.mutinywallet.com" +VITE_ESPLORA="https://mutiny.mempool.space/api" +VITE_LSP="https://lsp.voltageapi.com" +VITE_RGS="https://scorer.mutinywallet.com/v1/rgs/snapshot/" +# VITE_SELFHOSTED="true" // Removes Mutiny+ +VITE_AUTH="https://auth.mutinywallet.com" +VITE_SUBSCRIPTIONS="https://subscriptions.mutinywallet.com" +VITE_STORAGE="https://storage.mutinywallet.com/v2" +VITE_FEEDBACK="https://feedback.mutinywallet.com" +VITE_SCORER="https://scorer.mutinywallet.com" +VITE_PRIMAL="https://primal-cache.mutinywallet.com/api" diff --git a/.env.signet b/.env.signet new file mode 100644 index 00000000..e591950f --- /dev/null +++ b/.env.signet @@ -0,0 +1,14 @@ +#SIGNET + +VITE_NETWORK="signet" +VITE_PROXY="wss://p.mutinywallet.com" +VITE_ESPLORA="https://mutinynet.com/api" +VITE_LSP="https://signet-lsp.mutinywallet.com" +VITE_RGS="https://rgs.mutinynet.com/snapshot/" +# VITE_SELFHOSTED="true" // Removes Mutiny+ +VITE_AUTH="https://auth-staging.mutinywallet.com" +VITE_SUBSCRIPTIONS="https://subscriptions-staging.mutinywallet.com" +VITE_STORAGE="https://storage-staging.mutinywallet.com/v2" +VITE_FEEDBACK="https://feedback-staging.mutinywallet.com" +VITE_SCORER="https://scorer-staging.mutinywallet.com" +VITE_PRIMAL="https://primal-cache.mutinywallet.com/api" diff --git a/.github/workflows/android-prod.yml b/.github/workflows/android-prod.yml index 5c930d5b..25cd36fe 100644 --- a/.github/workflows/android-prod.yml +++ b/.github/workflows/android-prod.yml @@ -85,6 +85,8 @@ jobs: alias: ${{ secrets.KEY_ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} + env: + BUILD_TOOLS_VERSION: "30.0.3" - name: Build APK working-directory: android @@ -98,6 +100,8 @@ jobs: alias: ${{ secrets.KEY_ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} + env: + BUILD_TOOLS_VERSION: "30.0.3" - name: Create Release id: create_release diff --git a/.github/workflows/android-staging.yml b/.github/workflows/android-staging.yml index aec3c38c..d444d299 100644 --- a/.github/workflows/android-staging.yml +++ b/.github/workflows/android-staging.yml @@ -86,6 +86,8 @@ jobs: alias: ${{ secrets.KEY_ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} + env: + BUILD_TOOLS_VERSION: "30.0.3" - name: Build APK working-directory: android @@ -99,6 +101,8 @@ jobs: alias: ${{ secrets.KEY_ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} + env: + BUILD_TOOLS_VERSION: "30.0.3" # F-Droid APK - name: Upload F-Droid APK Universal Asset diff --git a/android/app/build.gradle b/android/app/build.gradle index 5eaa5882..f717e28e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.mutinywallet.mutinywallet" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 43 - versionName "0.5.1" + versionCode 44 + versionName "0.5.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj index 82be880f..9545748b 100644 --- a/ios/App/App.xcodeproj/project.pbxproj +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -360,7 +360,7 @@ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 1.5.0; + MARKETING_VERSION = 1.5.2; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; PRODUCT_BUNDLE_IDENTIFIER = com.mutinywallet.mutiny; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -387,7 +387,7 @@ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 1.5.0; + MARKETING_VERSION = 1.5.2; PRODUCT_BUNDLE_IDENTIFIER = com.mutinywallet.mutiny; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/ios/App/Podfile.lock b/ios/App/Podfile.lock index 121698af..3c3b7031 100644 --- a/ios/App/Podfile.lock +++ b/ios/App/Podfile.lock @@ -155,4 +155,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 0a4556c3ff620e7baf2e9aeba1f6e9f4fe406a0f -COCOAPODS: 1.10.2 +COCOAPODS: 1.14.2 diff --git a/package.json b/package.json index 42f055eb..c17f71fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mutiny-wallet", - "version": "0.5.1", + "version": "0.5.2", "license": "MIT", "packageManager": "pnpm@8.6.6", "scripts": { @@ -55,7 +55,7 @@ "@kobalte/core": "^0.9.8", "@kobalte/tailwindcss": "^0.5.0", "@modular-forms/solid": "^0.18.1", - "@mutinywallet/mutiny-wasm": "0.5.1", + "@mutinywallet/mutiny-wasm": "0.5.2", "@mutinywallet/waila-wasm": "^0.2.6", "@solid-primitives/upload": "^0.0.111", "@solid-primitives/websocket": "^1.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 07174584..162a8ac8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,8 +54,8 @@ importers: specifier: ^0.18.1 version: 0.18.1(solid-js@1.8.5) '@mutinywallet/mutiny-wasm': - specifier: 0.5.1 - version: 0.5.1 + specifier: 0.5.2 + version: 0.5.2 '@mutinywallet/waila-wasm': specifier: ^0.2.6 version: 0.2.6 @@ -2584,8 +2584,8 @@ packages: solid-js: 1.8.5 dev: false - /@mutinywallet/mutiny-wasm@0.5.1: - resolution: {integrity: sha512-BEx2EsNtJdUV2rt/dMXkhemllKrQH3aNFXc0EcL2Q0ADZWLA3I12nOwkcxsYQV0sVCjUt+zMs6jjjfcexdab/Q==} + /@mutinywallet/mutiny-wasm@0.5.2: + resolution: {integrity: sha512-81wMXeE44HkO3B4h97DwoixM7tmgZIRhVdgvi7aTlNg3GxshjsSAMNw9ehU2osO1niTHFRdgwGCvGsFPLBdSSA==} dev: false /@mutinywallet/waila-wasm@0.2.6: diff --git a/src/components/ActivityItem.tsx b/src/components/ActivityItem.tsx index e3e707fb..b942819e 100644 --- a/src/components/ActivityItem.tsx +++ b/src/components/ActivityItem.tsx @@ -183,7 +183,12 @@ export function ActivityItem(props: { 2147483647}> - + + diff --git a/src/components/PendingNwc.tsx b/src/components/PendingNwc.tsx index e1a0980e..7bacd417 100644 --- a/src/components/PendingNwc.tsx +++ b/src/components/PendingNwc.tsx @@ -78,8 +78,20 @@ export function PendingNwc() { await state.mutiny_wallet?.approve_invoice(item.id); await vibrateSuccess(); } catch (e) { - setError(eify(e)); - console.error(e); + const err = eify(e); + // If we've already paid this invoice, just ignore the error + // we just want to remove it from the list and continue + if (err.message === "An invoice must not get payed twice.") { + // wrap in try/catch so we don't crash if the invoice is already gone + try { + await state.mutiny_wallet?.deny_invoice(item.id); + } catch (_e) { + // do nothing + } + } else { + setError(err); + console.error(e); + } } finally { setPaying(""); refetch(); diff --git a/src/utils/currencies.ts b/src/utils/currencies.ts index 6d17c02e..04fc428a 100644 --- a/src/utils/currencies.ts +++ b/src/utils/currencies.ts @@ -5,6 +5,8 @@ export interface Currency { maxFractionalDigits: number; } +// When populating with new currencies it is recommended to get data from: https://www.xe.com/currency/usd-us-dollar/ + /** * BTC_USD_OPTIONS is an array of BTC and USD currencies * These are separated from the rest of the list for ease of access by the user and necessary access in the megaStore @@ -47,6 +49,24 @@ export const FIAT_OPTIONS: Currency[] = [ value: "AED", maxFractionalDigits: 2 }, + { + label: "Albanian Lek ALL", + value: "ALL", + hasSymbol: "Lek", + maxFractionalDigits: 2 + }, + { + label: "Dutch Guilder ANG", + value: "ANG", + hasSymbol: "ƒ", + maxFractionalDigits: 2 + }, + { + label: "Angolan Kwanza AOA", + value: "AOA", + hasSymbol: "Kz", + maxFractionalDigits: 2 + }, { label: "Argentine Peso ARS", value: "ARS", @@ -59,36 +79,84 @@ export const FIAT_OPTIONS: Currency[] = [ hasSymbol: "$", maxFractionalDigits: 2 }, + { + label: "Azerbaijan Manat AZN", + value: "AZN", + hasSymbol: "₼", + maxFractionalDigits: 2 + }, { label: "Bangladeshi Taka BDT", value: "BDT", hasSymbol: "৳", maxFractionalDigits: 2 }, + { + label: "Bulgarian Lev BGN", + value: "BGN", + hasSymbol: "лв", + maxFractionalDigits: 2 + }, { label: "Bahraini Dinar BHD", value: "BHD", hasSymbol: "BD", maxFractionalDigits: 3 }, + { + label: "Burundian Franc BIF", + value: "BIF", + hasSymbol: "Franc", + maxFractionalDigits: 2 + }, { label: "Bermuda Dollar BMD", value: "BMD", hasSymbol: "$", maxFractionalDigits: 2 }, + { + label: "Bolivian Bolíviano BOB", + value: "BOB", + hasSymbol: "$b", + maxFractionalDigits: 2 + }, { label: "Brazilian Real BRL", value: "BRL", hasSymbol: "R$", maxFractionalDigits: 2 }, + { + label: "Botswana Pula BWP", + value: "BWP", + hasSymbol: "P", + maxFractionalDigits: 2 + }, + { + label: "Belarusian Ruble BYN", + value: "BYN", + hasSymbol: "p.", + maxFractionalDigits: 2 + }, + { + label: "Belizean Dollar BZD", + value: "BZD", + hasSymbol: "BZ$", + maxFractionalDigits: 2 + }, { label: "Canadian Dollar CAD", value: "CAD", hasSymbol: "$", maxFractionalDigits: 2 }, + { + label: "Congolese Franc CDF", + value: "CDF", + hasSymbol: "FC", + maxFractionalDigits: 0 + }, { label: "Swiss Franc CHF", value: "CHF", maxFractionalDigits: 2 }, { label: "Chilean Peso CLP", @@ -102,18 +170,66 @@ export const FIAT_OPTIONS: Currency[] = [ hasSymbol: "¥", maxFractionalDigits: 2 }, + { + label: "Colombian Peso COP", + value: "COP", + hasSymbol: "$", + maxFractionalDigits: 2 + }, + { + label: "Costa Rican Colon CRC", + value: "CRC", + hasSymbol: "₡", + maxFractionalDigits: 2 + }, + { + label: "Cuban Peso CUP", + value: "CUP", + hasSymbol: "₱", + maxFractionalDigits: 2 + }, { label: "Czech Koruna CZK", value: "CZK", hasSymbol: "Kč", maxFractionalDigits: 2 }, + { + label: "Djiboutian Franc DJF", + value: "DJF", + hasSymbol: "Franc", + maxFractionalDigits: 0 + }, { label: "Danish Krone DKK", value: "DKK", hasSymbol: "kr", maxFractionalDigits: 2 }, + { + label: "Dominican Peso DOP", + value: "DOP", + hasSymbol: "RD$", + maxFractionalDigits: 2 + }, + { + label: "Algerian Dinar DZD", + value: "DZD", + hasSymbol: "DA", + maxFractionalDigits: 2 + }, + { + label: "Egyptian Pound EGP", + value: "EGP", + hasSymbol: "£", + maxFractionalDigits: 2 + }, + { + label: "Ethiopian Birr ETP", + value: "ETP", + hasSymbol: "Br", + maxFractionalDigits: 2 + }, { label: "Euro EUR", value: "EUR", @@ -126,18 +242,54 @@ export const FIAT_OPTIONS: Currency[] = [ hasSymbol: "₤", maxFractionalDigits: 2 }, + { + label: "Georgian Lari GEL", + value: "GEL", + hasSymbol: "Lari", + maxFractionalDigits: 2 + }, + { + label: "Ghanaian Cedi GHS", + value: "GHS", + hasSymbol: "₵", + maxFractionalDigits: 2 + }, + { + label: "Guinean Franc GNF", + value: "GNF", + hasSymbol: "Franc", + maxFractionalDigits: 2 + }, + { + label: "Guatemalan Quetzal GTQ", + value: "GTQ", + hasSymbol: "Q", + maxFractionalDigits: 2 + }, { label: "Hong Kong Dollar HKD", value: "HKD", hasSymbol: "$", maxFractionalDigits: 2 }, + { + label: "Honduran Lempira HNL", + value: "HNL", + hasSymbol: "L", + maxFractionalDigits: 2 + }, { label: "Hungarian Forint HUF", value: "HUF", hasSymbol: "Ft", maxFractionalDigits: 2 }, + { + label: "Indonesian Rupiah IDR", + value: "IDR", + hasSymbol: "Rp", + maxFractionalDigits: 2 + }, { label: "Israeli New Shekel ILS", value: "ILS", @@ -150,12 +302,54 @@ export const FIAT_OPTIONS: Currency[] = [ hasSymbol: "₹", maxFractionalDigits: 2 }, + { + label: "Iranian Rial IRR", + value: "IRR", + hasSymbol: "﷼", + maxFractionalDigits: 2 + }, + { + label: "Iranian Toman IRT", + value: "IRT", + hasSymbol: "﷼", + maxFractionalDigits: 2 + }, + { + label: "Icelandic Krona ISK", + value: "ISK", + hasSymbol: "kr", + maxFractionalDigits: 0 + }, + { + label: "Jamaican Dollar JMD", + value: "JMD", + hasSymbol: "J$", + maxFractionalDigits: 2 + }, + { + label: "Jordanian Dinar JOD", + value: "JOD", + hasSymbol: "Dinar", + maxFractionalDigits: 2 + }, { label: "Japanese Yen JPY", value: "JPY", hasSymbol: "¥", maxFractionalDigits: 0 }, + { + label: "Kenyan Shilling KES", + value: "KES", + hasSymbol: "KSh", + maxFractionalDigits: 2 + }, + { + label: "Kyrgyzstani Som KGS", + value: "KGS", + hasSymbol: "лв", + maxFractionalDigits: 0 + }, { label: "Korean Won KRW", value: "KRW", @@ -163,9 +357,16 @@ export const FIAT_OPTIONS: Currency[] = [ maxFractionalDigits: 0 }, { - label: "Kuwaiti Dinar KWD", - value: "KWD", - maxFractionalDigits: 3 + label: "Kazakhstani Tenge KZT", + value: "KZT", + hasSymbol: "₸", + maxFractionalDigits: 2 + }, + { + label: "Lebanese Pound LBP", + value: "LBP", + hasSymbol: "ل.ل", + maxFractionalDigits: 2 }, { label: "Sri Lankan Rupee LKR", @@ -174,11 +375,28 @@ export const FIAT_OPTIONS: Currency[] = [ maxFractionalDigits: 2 }, { - label: "Myanmar Kyat MMK", - value: "MMK", - hasSymbol: "Ks", + label: "Moroccan Dirham MAD", + value: "MAD", + hasSymbol: "Dirham", maxFractionalDigits: 2 }, + { + label: "Malagasy Ariary MGA", + value: "MGA", + hasSymbol: "Ar", + maxFractionalDigits: 1 + }, + { + label: "Cuban Peso MLC", + value: "MLC", + maxFractionalDigits: 2 + }, + { + label: "Mauritanian Ouguiya MRU", + value: "MRU", + hasSymbol: "UM", + maxFractionalDigits: 1 + }, { label: "Mexican Peso MXN", value: "MXN", @@ -192,9 +410,9 @@ export const FIAT_OPTIONS: Currency[] = [ maxFractionalDigits: 2 }, { - label: "Norwegian Krone NOK", - value: "NOK", - hasSymbol: "kr", + label: "Namibian Dollar NAD", + value: "NAD", + hasSymbol: "$", maxFractionalDigits: 2 }, { @@ -203,12 +421,42 @@ export const FIAT_OPTIONS: Currency[] = [ hasSymbol: "₦", maxFractionalDigits: 2 }, + { + label: "Nicaraguan Cordoba NIO", + value: "NIO", + hasSymbol: "C$", + maxFractionalDigits: 2 + }, + { + label: "Norwegian Krone NOK", + value: "NOK", + hasSymbol: "kr", + maxFractionalDigits: 2 + }, + { + label: "Nepalese Rupee NPR", + value: "NPR", + hasSymbol: "₨", + maxFractionalDigits: 2 + }, { label: "New Zealand Dollar NZD", value: "NZD", hasSymbol: "$", maxFractionalDigits: 2 }, + { + label: "Panamanian Balboa PAB", + value: "PAB", + hasSymbol: "B/.", + maxFractionalDigits: 2 + }, + { + label: "Peruvian Sol PEN", + value: "PEN", + hasSymbol: "S/.", + maxFractionalDigits: 2 + }, { label: "Philippine Peso PHP", value: "PHP", @@ -227,12 +475,42 @@ export const FIAT_OPTIONS: Currency[] = [ hasSymbol: "zł", maxFractionalDigits: 2 }, + { + label: "Paraguayan Guarani PYG", + value: "PYG", + hasSymbol: "Gs", + maxFractionalDigits: 2 + }, + { + label: "Qatari Riyal QAR", + value: "QAR", + hasSymbol: "﷼", + maxFractionalDigits: 2 + }, + { + label: "Romanian Leu RON", + value: "RON", + hasSymbol: "lei", + maxFractionalDigits: 2 + }, + { + label: "Serbian Dinar RSD", + value: "RSD", + hasSymbol: "РСД", + maxFractionalDigits: 2 + }, { label: "Russian Ruble RUB", value: "RUB", hasSymbol: "₽", maxFractionalDigits: 2 }, + { + label: "Rwandan Franc RWF", + value: "RWF", + hasSymbol: "Franc", + maxFractionalDigits: 2 + }, { label: "Saudi Riyal SAR", value: "SAR", @@ -257,6 +535,12 @@ export const FIAT_OPTIONS: Currency[] = [ hasSymbol: "฿", maxFractionalDigits: 2 }, + { + label: "Tunisian Dinar TND", + value: "TND", + hasSymbol: "Dinar", + maxFractionalDigits: 0 + }, { label: "Turkish Lira TRY", value: "TRY", @@ -269,6 +553,12 @@ export const FIAT_OPTIONS: Currency[] = [ hasSymbol: "NT$", maxFractionalDigits: 2 }, + { + label: "Tanzanian Shilling TZS", + value: "TZS", + hasSymbol: "Shilling", + maxFractionalDigits: 2 + }, { label: "Ukrainian Hryvnia UAH", value: "UAH", @@ -276,8 +566,25 @@ export const FIAT_OPTIONS: Currency[] = [ maxFractionalDigits: 2 }, { - label: "Venezuelan Bolívar VEF", - value: "VEF", + label: "Ugandan Shilling UGX", + value: "UGX", + maxFractionalDigits: 0 + }, + { + label: "Uruguayan Peso UYU", + value: "UYU", + hasSymbol: "$U", + maxFractionalDigits: 2 + }, + { + label: "Uzbekistani Som UZS", + value: "UZS", + hasSymbol: "лв", + maxFractionalDigits: 2 + }, + { + label: "Venezuelan Bolívar VES", + value: "VES", hasSymbol: "Bs", maxFractionalDigits: 2 }, @@ -287,6 +594,36 @@ export const FIAT_OPTIONS: Currency[] = [ hasSymbol: "₫", maxFractionalDigits: 0 }, + { + label: "Central African CFA Franc BEAC XAF", + value: "XAF", + hasSymbol: "FCFA", + maxFractionalDigits: 2 + }, + { + label: "Silver Ounce XAG", + value: "XAG", + hasSymbol: "Oz", + maxFractionalDigits: 6 + }, + { + label: "Gold Ounce XAU", + value: "XAU", + hasSymbol: "Oz", + maxFractionalDigits: 6 + }, + { + label: "CFA Franc XOF", + value: "XOF", + hasSymbol: "FCFA", + maxFractionalDigits: 2 + }, + { + label: "Platinum Ounce XPT", + value: "XPT", + hasSymbol: "Oz", + maxFractionalDigits: 6 + }, { label: "South African Rand ZAR", value: "ZAR", diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 99ec8beb..baa9fe4f 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -29,6 +29,7 @@ module.exports = { "m-blue-dark": "hsla(220, 59%, 42%, 1)", "m-red": "hsla(343, 92%, 54%, 1)", "m-red-dark": "hsla(343, 92%, 44%, 1)", + "m-yellow": "#E7D538", "sidebar-gray": "hsla(222, 15%, 7%, 1)", "m-grey-350": "hsla(0, 0%, 73%, 1)", "m-grey-400": "hsla(0, 0%, 64%, 1)",