Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly display the currently in use LSP #1253

Merged
merged 3 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
node-version: 18.x

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
node-version: 18.x

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
node-version: 18.x

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
node-version: 18.x

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ios-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ jobs:
- name: Checkout source
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Setup Node.js
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ios-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ jobs:
- name: Checkout source
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Setup Node.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
node-version: 18.x

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.mutinywallet.mutinywallet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 72
versionName "1.7.11"
versionCode 73
versionName "1.7.12"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Expand Down
4 changes: 2 additions & 2 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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.7.11;
MARKETING_VERSION = 1.7.12;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = "com.mutinywallet.mutiny-test";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -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.7.11;
MARKETING_VERSION = 1.7.12;
PRODUCT_BUNDLE_IDENTIFIER = com.mutinywallet.mutiny;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mutiny-wallet",
"version": "1.7.11",
"version": "1.7.12",
"license": "MIT",
"packageManager": "[email protected]",
"scripts": {
Expand Down Expand Up @@ -56,7 +56,7 @@
"@kobalte/core": "^0.12.6",
"@kobalte/tailwindcss": "^0.9.0",
"@modular-forms/solid": "^0.20.0",
"@mutinywallet/mutiny-wasm": "1.7.10",
"@mutinywallet/mutiny-wasm": "1.7.11",
"@sentry/browser": "^8.7.0",
"@sentry/vite-plugin": "^2.18.0",
"@solid-primitives/upload": "^0.0.117",
Expand Down
9 changes: 4 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 24 additions & 9 deletions src/routes/settings/Servers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
ExternalLink,
LargeHeader,
LoadingShimmer,
MutinyWalletGuard,
NavBar,
NiceP,
showToast,
Expand Down Expand Up @@ -255,7 +256,19 @@ function SettingsStringsEditor(props: {
}

function AsyncSettingsEditor() {
const [settings] = createResource<MutinyWalletSettingStrings>(getSettings);
const [_state, _actions, sw] = useMegaStore();

const [settings] = createResource<MutinyWalletSettingStrings>(async () => {
const settings = await getSettings();

// set the lsp to what the node manager is using
const lsp = await sw.get_configured_lsp();
settings.lsp = lsp.url;
settings.lsps_connection_string = lsp.connection_string;
settings.lsps_token = lsp.token;

return settings;
});

return (
<Switch>
Expand All @@ -272,13 +285,15 @@ function AsyncSettingsEditor() {
export function Servers() {
const i18n = useI18n();
return (
<DefaultMain>
<BackLink href="/settings" title={i18n.t("settings.header")} />
<LargeHeader>{i18n.t("settings.servers.title")}</LargeHeader>
<Suspense fallback={<LoadingShimmer />}>
<AsyncSettingsEditor />
</Suspense>
<NavBar activeTab="settings" />
</DefaultMain>
<MutinyWalletGuard>
<DefaultMain>
<BackLink href="/settings" title={i18n.t("settings.header")} />
<LargeHeader>{i18n.t("settings.servers.title")}</LargeHeader>
<Suspense fallback={<LoadingShimmer />}>
<AsyncSettingsEditor />
</Suspense>
<NavBar activeTab="settings" />
</DefaultMain>
</MutinyWalletGuard>
);
}
16 changes: 16 additions & 0 deletions src/workers/walletWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ export async function estimate_tx_fee(
const fee = await wallet!.estimate_tx_fee(address, amount, feeRate);
return fee;
}

/**
* Calls upon a LNURL to get the parameters for it.
* This contains what kind of LNURL it is (pay, withdrawal, auth, etc).
Expand Down Expand Up @@ -1245,6 +1246,21 @@ export async function change_lsp(
await wallet!.change_lsp(lsp_url, lsp_connection_string, lsps_token);
}

type LspConfig = {
url?: string;
connection_string?: string;
token?: string;
};

/**
* Returns the configured LSP for the node manager.
*
* @returns {Promise<LspConfig>}
*/
export async function get_configured_lsp(): Promise<LspConfig> {
return await wallet!.get_configured_lsp();
}

/**
* Resets BDK's keychain tracker. This will require a re-sync of the blockchain.
*
Expand Down
Loading