Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit 2504e57

Browse files
Change tx id to internal for fedimint onchain
1 parent fd0fcef commit 2504e57

File tree

2 files changed

+47
-41
lines changed

2 files changed

+47
-41
lines changed

src/components/ActivityDetailsModal.tsx

Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -408,48 +408,53 @@ function OnchainDetails(props: {
408408
"Pending"
409409
)}
410410
</KeyValue>
411-
<KeyValue key={i18n.t("activity.transaction_details.txid")}>
412-
<div class="flex gap-1">
413-
{/* Have to do all these shenanigans because css / html is hard */}
414-
<div class="grid w-full grid-cols-[minmax(0,_1fr)_auto] gap-1">
415-
<a
416-
target="_blank"
417-
rel="noopener noreferrer"
418-
href={mempoolTxUrl(props.info.txid, network)}
411+
<Show when={props.info.txid}>
412+
<KeyValue key={i18n.t("activity.transaction_details.txid")}>
413+
<div class="flex gap-1">
414+
{/* Have to do all these shenanigans because css / html is hard */}
415+
<div class="grid w-full grid-cols-[minmax(0,_1fr)_auto] gap-1">
416+
<a
417+
target="_blank"
418+
rel="noopener noreferrer"
419+
href={mempoolTxUrl(
420+
props.info.txid,
421+
network
422+
)}
423+
>
424+
<div class="flex flex-nowrap items-center font-mono text-white">
425+
<span class="truncate">
426+
{props.info.txid}
427+
</span>
428+
<span>
429+
{props.info.txid.length > 32
430+
? props.info.txid.slice(-8)
431+
: ""}
432+
</span>
433+
<svg
434+
class="inline-block w-[16px] overflow-visible pl-0.5 text-white"
435+
width="16"
436+
height="16"
437+
fill="none"
438+
xmlns="http://www.w3.org/2000/svg"
439+
>
440+
<path
441+
d="M6.00002 3.33337v1.33334H10.39L2.66669 12.39l.94333.9434 7.72338-7.72336V10h1.3333V3.33337H6.00002Z"
442+
fill="currentColor"
443+
/>
444+
</svg>
445+
</div>
446+
</a>
447+
</div>
448+
<button
449+
class="min-w-[1.5rem] p-1"
450+
classList={{ "bg-m-green rounded": copied() }}
451+
onClick={() => copy(props.info.txid)}
419452
>
420-
<div class="flex flex-nowrap items-center font-mono text-white">
421-
<span class="truncate">
422-
{props.info.txid}
423-
</span>
424-
<span>
425-
{props.info.txid.length > 32
426-
? props.info.txid.slice(-8)
427-
: ""}
428-
</span>
429-
<svg
430-
class="inline-block w-[16px] overflow-visible pl-0.5 text-white"
431-
width="16"
432-
height="16"
433-
fill="none"
434-
xmlns="http://www.w3.org/2000/svg"
435-
>
436-
<path
437-
d="M6.00002 3.33337v1.33334H10.39L2.66669 12.39l.94333.9434 7.72338-7.72336V10h1.3333V3.33337H6.00002Z"
438-
fill="currentColor"
439-
/>
440-
</svg>
441-
</div>
442-
</a>
453+
<Copy class="h-4 w-4" />
454+
</button>
443455
</div>
444-
<button
445-
class="min-w-[1.5rem] p-1"
446-
classList={{ "bg-m-green rounded": copied() }}
447-
onClick={() => copy(props.info.txid)}
448-
>
449-
<Copy class="h-4 w-4" />
450-
</button>
451-
</div>
452-
</KeyValue>
456+
</KeyValue>
457+
</Show>
453458
</ul>
454459
</VStack>
455460
);

src/routes/Receive.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export type OnChainTx = {
6060
}>;
6161
};
6262
txid: string;
63+
internal_id: string;
6364
received: number;
6465
sent: number;
6566
confirmation_time: {
@@ -213,7 +214,7 @@ export function Receive() {
213214
const paymentTxId =
214215
paidState() === "onchain_paid"
215216
? paymentTx()
216-
? paymentTx()?.txid
217+
? paymentTx()?.internal_id
217218
: undefined
218219
: paymentInvoice()
219220
? paymentInvoice()?.payment_hash

0 commit comments

Comments
 (0)