mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00:00
Fix swap dispute prompts
This commit is contained in:
parent
cc87054246
commit
a7ad9c8c7e
@ -8,17 +8,17 @@ interface Props {
|
||||
}
|
||||
|
||||
const LinearDeterminate = ({ expiresAt, totalSecsExp }: Props): JSX.Element => {
|
||||
const timePercentLeft = function(){
|
||||
if (expiresAt && totalSecsExp){
|
||||
const timePercentLeft = function () {
|
||||
if (expiresAt && totalSecsExp) {
|
||||
const lapseTime = calcTimeDelta(new Date(expiresAt)).total / 1000;
|
||||
return (lapseTime / totalSecsExp) * 100;
|
||||
} else {
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const [progress, setProgress] = useState<number>(timePercentLeft);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const timer = setInterval(() => {
|
||||
setProgress(timePercentLeft);
|
||||
|
@ -603,15 +603,15 @@ const TradeBox = ({
|
||||
// 18: 'Taker lost dispute'
|
||||
} else if ((status == 17 && isMaker) || (status == 18 && !isMaker)) {
|
||||
title = 'You have won the dispute';
|
||||
prompt = function () {
|
||||
return <DisputeWinnerPrompt />;
|
||||
};
|
||||
} else if ((status == 17 && !isMaker) || (status == 18 && isMaker)) {
|
||||
title = 'You have lost the dispute';
|
||||
prompt = function () {
|
||||
return <DisputeLoserPrompt />;
|
||||
};
|
||||
bondStatus = 'settled';
|
||||
} else if ((status == 17 && !isMaker) || (status == 18 && isMaker)) {
|
||||
title = 'You have lost the dispute';
|
||||
prompt = function () {
|
||||
return <DisputeWinnerPrompt />;
|
||||
};
|
||||
}
|
||||
|
||||
return { title, titleVariables, titleColor, prompt, bondStatus, titleIcon };
|
||||
|
Loading…
Reference in New Issue
Block a user