@@ -232,6 +291,13 @@ export default function TipsPage() {
{formatAmount(tip.amount, tip.asset)}
+ {tip.status === 'pending' && (
+
+ )}
To{' '}
@@ -281,40 +347,58 @@ export default function TipsPage() {
) : (
- receivedTips.map((tip) => (
-
-
-
-
- +{formatAmount(tip.amount, tip.asset)}
-
-
-
-
- {tip.recipient_platform && (
-
- Via {tip.recipient_platform}
-
- )}
-
- {formatDate(tip.created_at)}
-
-
-
+ receivedTips.map((tip) => {
+ const canClaim = tip.status === 'pending' && tip.is_claimable && claimableTipIds.has(tip.id);
+ const isConfirming = tip.status === 'pending' && !tip.is_claimable && tip.confirmations_required > 0;
- {tip.status === 'pending' && claimableTipIds.has(tip.id) && hasExtension && (
-
- )}
-
- ))
+ return (
+
+
+
+
+ +{formatAmount(tip.amount, tip.asset)}
+
+
+ {tip.status === 'pending' && (
+
+ )}
+
+
+ {tip.recipient_platform && (
+
+ Via {tip.recipient_platform}
+
+ )}
+
+ {formatDate(tip.created_at)}
+
+
+
+
+ {canClaim && hasExtension ? (
+
+ ) : isConfirming ? (
+
+ Confirming...
+
+ ) : null}
+
+ );
+ })
)}
)}
diff --git a/src/lib/api.ts b/src/lib/api.ts
index aed2feb..efb8072 100644
--- a/src/lib/api.ts
+++ b/src/lib/api.ts
@@ -185,6 +185,12 @@ export interface SentTip {
created_at: string;
claimed_at: string | null;
clawed_back_at: string | null;
+ /** Current number of confirmations for funding tx */
+ funding_confirmations: number;
+ /** Required confirmations before tip is claimable (XMR/GRIN=10, WOW=4, BTC/LTC=0) */
+ confirmations_required: number;
+ /** Whether the tip has enough confirmations to be claimed */
+ is_claimable: boolean;
}
export interface ClaimableTip {
@@ -207,6 +213,12 @@ export interface ReceivedTip {
created_at: string;
claimed_at: string | null;
clawed_back_at: string | null;
+ /** Current number of confirmations for funding tx */
+ funding_confirmations: number;
+ /** Required confirmations before tip is claimable (XMR/GRIN=10, WOW=4, BTC/LTC=0) */
+ confirmations_required: number;
+ /** Whether the tip has enough confirmations to be claimed */
+ is_claimable: boolean;
}
export async function getSentTips(token: string): Promise<{ tips: SentTip[] }> {