From d43738448c65abc51a625b01d500d4eb870a52f0 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 20 Oct 2020 10:36:15 -0230 Subject: [PATCH] Fix React warning about missing key in `AwaitingSwap` (#9655) The `AwaitingSwap` component was emitting a React warning when rendered because a component was being rendered in an array without having a `key` prop set. A key has been added to the `CountdownTimer` component, which is passed into the translation helper in an array. The warning no longer appears. --- ui/app/pages/swaps/awaiting-swap/awaiting-swap.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/app/pages/swaps/awaiting-swap/awaiting-swap.js b/ui/app/pages/swaps/awaiting-swap/awaiting-swap.js index 1ddb5252f..8f1053715 100644 --- a/ui/app/pages/swaps/awaiting-swap/awaiting-swap.js +++ b/ui/app/pages/swaps/awaiting-swap/awaiting-swap.js @@ -119,7 +119,14 @@ export default function AwaitingSwap ({ let countdownText if (timeRemainingIsNumber && !timeRemainingExpired && tradeTxData?.submittedTime) { - countdownText = + countdownText = ( + + ) } else if (tradeTxData?.submittedTime) { countdownText = t('swapsAlmostDone') } else {