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

Deploy to prod #693

Merged
merged 4 commits into from
Nov 10, 2023
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
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 32
versionName "0.4.31"
versionCode 33
versionName "0.4.32"
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 @@ -357,7 +357,7 @@
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.4.31;
MARKETING_VERSION = 1.4.32;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.mutinywallet.mutiny;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -383,7 +383,7 @@
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.4.31;
MARKETING_VERSION = 1.4.32;
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": "0.4.31",
"version": "0.4.32",
"license": "MIT",
"packageManager": "[email protected]",
"scripts": {
Expand Down Expand Up @@ -57,7 +57,7 @@
"@kobalte/core": "^0.9.8",
"@kobalte/tailwindcss": "^0.5.0",
"@modular-forms/solid": "^0.18.1",
"@mutinywallet/mutiny-wasm": "0.4.31",
"@mutinywallet/mutiny-wasm": "0.4.32",
"@mutinywallet/waila-wasm": "^0.2.4",
"@solid-primitives/upload": "^0.0.111",
"@solid-primitives/websocket": "^1.2.0",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

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

Binary file added src/assets/icons/megaclock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions src/components/ActivityDetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,15 @@ function LightningDetails(props: { info: MutinyInvoice; tags?: TagItem }) {
>
<MiniStringShower text={props.info.payment_hash ?? ""} />
</KeyValue>
<KeyValue
key={i18n.t(
"activity.transaction_details.payment_preimage"
)}
>
<MiniStringShower text={props.info.preimage ?? ""} />
</KeyValue>
<Show when={props.info.paid}>
<KeyValue
key={i18n.t(
"activity.transaction_details.payment_preimage"
)}
>
<MiniStringShower text={props.info.preimage ?? ""} />
</KeyValue>
</Show>
</ul>
</VStack>
);
Expand Down
11 changes: 11 additions & 0 deletions src/components/successfail/MegaClock.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import megaclock from "~/assets/icons/megaclock.png";

export function MegaClock() {
return (
<img
src={megaclock}
alt="fail"
class="mx-auto w-1/2 max-w-[30vh] flex-shrink"
/>
);
}
1 change: 1 addition & 0 deletions src/components/successfail/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./MegaCheck";
export * from "./MegaEx";
export * from "./MegaClock";
export * from "./SuccessModal";
5 changes: 4 additions & 1 deletion src/i18n/en/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ export default {
"Amount requested, {{amount}} SATS, does not equal amount set.",
error_clipboard: "Clipboard not supported",
error_keysend: "Keysend failed",
error_LNURL: "LNURL Pay failed"
error_LNURL: "LNURL Pay failed",
payment_pending: "Payment pending",
payment_pending_description:
"It's taking a while, but it's possible this payment may still go through. Please check 'Activity' for the current status."
},
feedback: {
header: "Give us feedback!",
Expand Down
7 changes: 6 additions & 1 deletion src/logic/errorDispatch.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
// IMPORTANT: this should match 1:1 with the MutinyJsError enum in mutiny-wasm
// If we can handle all of these, we can handle all the errors that Mutiny can throw

// WARNING: autogenerated code, generated by errorsToTs.cjs
// WARNING: autogenerated code, generated by calling:
// `node scripts/errorsToTs.cjs /path/to/mutiny-wasm/src/error.rs`
type MutinyError =
| "Mutiny is already running."
| "Mutiny is not running."
| "Incorrect expected network."
| "Resource Not found."
| "Funding transaction could not be created."
| "Network connection closed."
Expand All @@ -18,6 +20,7 @@ type MutinyError =
| "Failed to call on the given LNURL."
| "Failed to make a request to the LSP."
| "Failed to request channel from LSP due to funding error."
| "Failed to request channel from LSP due to amount being too high."
| "Failed to have a connection to the LSP node."
| "Subscription Client Not Configured"
| "Invalid Parameter"
Expand All @@ -38,12 +41,14 @@ type MutinyError =
| "Failed to execute a rapid gossip sync function"
| "Failed to read or write json from the front end"
| "The given node pubkey is invalid."
| "Failed to get nostr data."
| "Failed to get the bitcoin price."
| "Satoshi amount is invalid"
| "Failed to execute a dlc function"
| "Failed to execute a wasm_bindgen function"
| "Invalid Arguments were given"
| "Incorrect password entered."
| "Cannot change password to the same password."
| "Unknown Error";

export function matchError(e: unknown): Error {
Expand Down
40 changes: 31 additions & 9 deletions src/routes/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
InfoBox,
LargeHeader,
MegaCheck,
MegaClock,
MegaEx,
MutinyWalletGuard,
NavBar,
Expand Down Expand Up @@ -198,6 +199,30 @@ function DestinationShower(props: {
);
}

function Failure(props: { reason: string }) {
const i18n = useI18n();

return (
<Switch>
<Match when={props.reason === "Payment timed out."}>
<MegaClock />
<h1 class="mb-2 mt-4 w-full text-center text-2xl font-semibold md:text-3xl">
{i18n.t("send.payment_pending")}
</h1>
<InfoBox accent="white">
{i18n.t("send.payment_pending_description")}
</InfoBox>
</Match>
<Match when={true}>
<MegaEx />
<h1 class="mb-2 mt-4 w-full text-center text-2xl font-semibold md:text-3xl">
{props.reason}
</h1>
</Match>
</Switch>
);
}

export default function Send() {
const [state, actions] = useMegaStore();
const navigate = useNavigate();
Expand Down Expand Up @@ -635,15 +660,12 @@ export default function Send() {
>
<Switch>
<Match when={sentDetails()?.failure_reason}>
<MegaEx />
<h1 class="mb-2 mt-4 w-full text-center text-2xl font-semibold md:text-3xl">
{sentDetails()?.amount
? source() === "onchain"
? i18n.t("send.payment_initiated")
: i18n.t("send.payment_sent")
: sentDetails()?.failure_reason}
</h1>
{/*TODO: add failure hint logic for different failure conditions*/}
<Failure
reason={
sentDetails()?.failure_reason ||
"Payment failed for an unknown reason"
}
/>
</Match>
<Match when={true}>
<Show when={detailsId() && detailsKind()}>
Expand Down
Loading