mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-02-02 04:54:21 +01:00
update to 0.5.0-rc1
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
"@kobalte/core": "^0.9.8",
|
||||
"@kobalte/tailwindcss": "^0.5.0",
|
||||
"@modular-forms/solid": "^0.18.1",
|
||||
"@mutinywallet/mutiny-wasm": "0.4.39",
|
||||
"@mutinywallet/mutiny-wasm": "0.5.0-rc1",
|
||||
"@mutinywallet/waila-wasm": "^0.2.6",
|
||||
"@solid-primitives/upload": "^0.0.111",
|
||||
"@solid-primitives/websocket": "^1.2.0",
|
||||
|
||||
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@@ -54,8 +54,8 @@ importers:
|
||||
specifier: ^0.18.1
|
||||
version: 0.18.1(solid-js@1.8.5)
|
||||
'@mutinywallet/mutiny-wasm':
|
||||
specifier: 0.4.39
|
||||
version: 0.4.39
|
||||
specifier: 0.5.0-rc1
|
||||
version: 0.5.0-rc1
|
||||
'@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.4.39:
|
||||
resolution: {integrity: sha512-7vMgwteU0lCzMdX/INIIlsrq5jvEJA2aXuJmqHzGb6Bgty2jOfuWVvW54c2SZ3HQvuFHDPxjrrDB2QHabdBhMw==}
|
||||
/@mutinywallet/mutiny-wasm@0.5.0-rc1:
|
||||
resolution: {integrity: sha512-UTkLbJ+Hux79IoJqRwVVSxZng94ALkx89NXtYU69WzplPOHoIk/jFrjAXzLQK9MXu1dqsePu/yeAOwCumRkMPw==}
|
||||
dev: false
|
||||
|
||||
/@mutinywallet/waila-wasm@0.2.6:
|
||||
|
||||
@@ -39,19 +39,10 @@ function PeerItem(props: { peer: MutinyPeer }) {
|
||||
const [state, _] = useMegaStore();
|
||||
|
||||
const handleDisconnectPeer = async () => {
|
||||
const nodes = await state.mutiny_wallet?.list_nodes();
|
||||
const firstNode = (nodes[0] as string) || "";
|
||||
|
||||
if (props.peer.is_connected) {
|
||||
await state.mutiny_wallet?.disconnect_peer(
|
||||
firstNode,
|
||||
props.peer.pubkey
|
||||
);
|
||||
await state.mutiny_wallet?.disconnect_peer(props.peer.pubkey);
|
||||
} else {
|
||||
await state.mutiny_wallet?.delete_peer(
|
||||
firstNode,
|
||||
props.peer.pubkey
|
||||
);
|
||||
await state.mutiny_wallet?.delete_peer(props.peer.pubkey);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -132,13 +123,8 @@ function ConnectPeer(props: { refetchPeers: RefetchPeersType }) {
|
||||
e.preventDefault();
|
||||
|
||||
const peerConnectString = value().trim();
|
||||
const nodes = await state.mutiny_wallet?.list_nodes();
|
||||
const firstNode = (nodes[0] as string) || "";
|
||||
|
||||
await state.mutiny_wallet?.connect_to_peer(
|
||||
firstNode,
|
||||
peerConnectString
|
||||
);
|
||||
await state.mutiny_wallet?.connect_to_peer(peerConnectString);
|
||||
|
||||
await props.refetchPeers();
|
||||
|
||||
@@ -353,11 +339,7 @@ function OpenChannel(props: { refetchChannels: RefetchChannelsListType }) {
|
||||
const pubkey = peerPubkey().trim();
|
||||
const bigAmount = BigInt(amount());
|
||||
|
||||
const nodes = await state.mutiny_wallet?.list_nodes();
|
||||
const firstNode = (nodes[0] as string) || "";
|
||||
|
||||
const new_channel = await state.mutiny_wallet?.open_channel(
|
||||
firstNode,
|
||||
pubkey,
|
||||
bigAmount
|
||||
);
|
||||
|
||||
@@ -75,8 +75,7 @@ export function PendingNwc() {
|
||||
async function payItem(item: PendingItem) {
|
||||
try {
|
||||
setPaying(item.id);
|
||||
const nodes = await state.mutiny_wallet?.list_nodes();
|
||||
await state.mutiny_wallet?.approve_invoice(item.id, nodes[0]);
|
||||
await state.mutiny_wallet?.approve_invoice(item.id);
|
||||
await vibrateSuccess();
|
||||
} catch (e) {
|
||||
setError(eify(e));
|
||||
|
||||
@@ -258,6 +258,10 @@ export async function setupMutinyWallet(
|
||||
esplora,
|
||||
rgs,
|
||||
lsp,
|
||||
// LSPS connection string
|
||||
undefined,
|
||||
// LSPS token
|
||||
undefined,
|
||||
auth,
|
||||
subscriptions,
|
||||
storage,
|
||||
|
||||
@@ -573,13 +573,10 @@ export function Send() {
|
||||
const tags = await processContacts(selectedContacts());
|
||||
|
||||
if (source() === "lightning" && invoice() && bolt11) {
|
||||
const nodes = await state.mutiny_wallet?.list_nodes();
|
||||
const firstNode = (nodes[0] as string) || "";
|
||||
sentDetails.destination = bolt11;
|
||||
// If the invoice has sats use that, otherwise we pass the user-defined amount
|
||||
if (invoice()?.amount_sats) {
|
||||
const payment = await state.mutiny_wallet?.pay_invoice(
|
||||
firstNode,
|
||||
bolt11,
|
||||
undefined,
|
||||
tags
|
||||
@@ -589,7 +586,6 @@ export function Send() {
|
||||
sentDetails.fee_estimate = payment?.fees_paid || 0;
|
||||
} else {
|
||||
const payment = await state.mutiny_wallet?.pay_invoice(
|
||||
firstNode,
|
||||
bolt11,
|
||||
amountSats(),
|
||||
tags
|
||||
@@ -599,10 +595,7 @@ export function Send() {
|
||||
sentDetails.fee_estimate = payment?.fees_paid || 0;
|
||||
}
|
||||
} else if (source() === "lightning" && nodePubkey()) {
|
||||
const nodes = await state.mutiny_wallet?.list_nodes();
|
||||
const firstNode = (nodes[0] as string) || "";
|
||||
const payment = await state.mutiny_wallet?.keysend(
|
||||
firstNode,
|
||||
nodePubkey()!,
|
||||
amountSats(),
|
||||
undefined, // todo add optional keysend message
|
||||
@@ -618,10 +611,7 @@ export function Send() {
|
||||
sentDetails.fee_estimate = payment?.fees_paid || 0;
|
||||
}
|
||||
} else if (source() === "lightning" && lnurlp()) {
|
||||
const nodes = await state.mutiny_wallet?.list_nodes();
|
||||
const firstNode = (nodes[0] as string) || "";
|
||||
const payment = await state.mutiny_wallet?.lnurl_pay(
|
||||
firstNode,
|
||||
lnurlp()!,
|
||||
amountSats(),
|
||||
undefined, // zap_npub
|
||||
|
||||
@@ -116,13 +116,8 @@ export function Swap() {
|
||||
setIsConnecting(true);
|
||||
try {
|
||||
const peerConnectString = values.peer.trim();
|
||||
const nodes = await state.mutiny_wallet?.list_nodes();
|
||||
const firstNode = (nodes[0] as string) || "";
|
||||
|
||||
await state.mutiny_wallet?.connect_to_peer(
|
||||
firstNode,
|
||||
peerConnectString
|
||||
);
|
||||
await state.mutiny_wallet?.connect_to_peer(peerConnectString);
|
||||
|
||||
await refetch();
|
||||
|
||||
@@ -156,8 +151,6 @@ export function Swap() {
|
||||
if (canSwap()) {
|
||||
try {
|
||||
setLoading(true);
|
||||
const nodes = await state.mutiny_wallet?.list_nodes();
|
||||
const firstNode = (nodes[0] as string) || "";
|
||||
|
||||
let peer = undefined;
|
||||
|
||||
@@ -167,15 +160,11 @@ export function Swap() {
|
||||
|
||||
if (isMax()) {
|
||||
const new_channel =
|
||||
await state.mutiny_wallet?.sweep_all_to_channel(
|
||||
firstNode,
|
||||
peer
|
||||
);
|
||||
await state.mutiny_wallet?.sweep_all_to_channel(peer);
|
||||
|
||||
setChannelOpenResult({ channel: new_channel });
|
||||
} else {
|
||||
const new_channel = await state.mutiny_wallet?.open_channel(
|
||||
firstNode,
|
||||
peer,
|
||||
amountSats()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user