From ba17d9767ff41ef247ea8d100f46192f9038a33e Mon Sep 17 00:00:00 2001 From: koalasat Date: Thu, 31 Jul 2025 11:33:05 +0200 Subject: [PATCH] Small UI tweaks --- .../components/Charts/DepthChart/index.tsx | 25 ++++++++++++------- .../MakerForm/AutocompletePayments.tsx | 1 - .../TradeBox/EncryptedChat/index.tsx | 6 +++-- release_notes.md | 16 ++++++------ 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/Charts/DepthChart/index.tsx b/frontend/src/components/Charts/DepthChart/index.tsx index 31607551..b75f1777 100644 --- a/frontend/src/components/Charts/DepthChart/index.tsx +++ b/frontend/src/components/Charts/DepthChart/index.tsx @@ -102,7 +102,7 @@ const DepthChart: React.FC = ({ const prices: number[] = enrichedOrders.map((order) => order?.base_price ?? 0); const medianValue = ~~matchMedian(prices); - const maxValue = prices.sort((a, b) => b - a).slice(0, 1)[0] ?? 1500; + const maxValue = prices.sort((a, b) => b - a).slice(0, 1)[0] ?? 0; const maxRange = maxValue - medianValue; const rangeSteps = maxRange / 10; @@ -261,11 +261,21 @@ const DepthChart: React.FC = ({ const formatAxisX = (value: number): string => { if (xType === 'base_price') { - return value.toString(); + let formatted = value; + if (value > 1000000) { + formatted = formatted / 1000000; + return `${formatted}M`; + } else if (value > 1000) { + formatted = formatted / 1000; + return `${formatted}K`; + } else { + return value.toString(); + } + } else { + return `${value}%`; } - return `${value}%`; }; - const formatAxisY = (value: number): string => `${value}BTC`; + const formatAxisY = (value: number): string => `${value}₿`; const handleOnClick: PointMouseHandler = (point: Point) => { onOrderClicked(point.data?.order?.id, point.data?.order?.coordinatorShortAlias); }; @@ -361,10 +371,7 @@ const DepthChart: React.FC = ({ - + = ({ format: formatAxisX, }} margin={{ - left: 4.64 * em, + left: 3 * em, right: 0.714 * em, bottom: xType === 'base_price' diff --git a/frontend/src/components/MakerForm/AutocompletePayments.tsx b/frontend/src/components/MakerForm/AutocompletePayments.tsx index c108e2cb..7015b35a 100644 --- a/frontend/src/components/MakerForm/AutocompletePayments.tsx +++ b/frontend/src/components/MakerForm/AutocompletePayments.tsx @@ -439,7 +439,6 @@ const AutocompletePayments: React.FC = (props) => { {value.length > 0 && !props.multiple ? null : ( = ({ const wrappedEvent = nip17.wrapEvent(slot?.nostrSecKey, recipient, content); - const oneMonth = 2419200; + const fourteenDays = 14 * 24 * 60 * 60; + const randomSeconds = Math.floor(Math.random() * fourteenDays); + const expirationTime = Math.floor(Date.now() / 1000) + fourteenDays + randomSeconds; - wrappedEvent.tags.push(['expiration', (wrappedEvent.created_at + oneMonth).toString()]); + wrappedEvent.tags.push(['expiration', expirationTime.toString()]); federation.roboPool.sendEvent(wrappedEvent); } catch (error) { diff --git a/release_notes.md b/release_notes.md index 6b76c848..528956ad 100644 --- a/release_notes.md +++ b/release_notes.md @@ -9,12 +9,12 @@ RoboSats v0.8.1-alpha is now out! :rocket: # Android -**[Click to download universal RoboSats APK for Android](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-v0.8.1.alpha-universal.apk)** +**[Click to download universal RoboSats APK for Android](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-v0.8.1.alpha-universal.short_sha.apk)** Smaller bundles for each CPU architecture available in the attachments. ### Verify the app using GPG: -1. [Download the ascii armored signature](https://github.com/Reckless-Satoshi/robosats/releases/download/v0.8.1-alpha/robosats-v0.8.1.alpha-universal.${{ steps.short-sha.outputs.short_sha }}.apk.asc) +1. [Download the ascii armored signature](https://github.com/Reckless-Satoshi/robosats/releases/download/v0.8.1-alpha/robosats-v0.8.1.alpha-universal.short_sha.apk.asc) 2. Run this command on a directory that contains the apk file and and the ascii armored signature. `gpg --verify robosats-v0.8.1.alpha-universal.apk.asc` @@ -28,17 +28,17 @@ Additionally, you can download it from [Izzysoft repository](https://apt.izzysof **Download the Desktop App zip file** Find the zip file that suits with your operative system: -- [Windows](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-win32-ia32.${{ steps.short-sha.outputs.short_sha }}.zip) -- [Mac](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-mac-darwin-x64.${{ steps.short-sha.outputs.short_sha }}.zip) -- [Linux](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-linux-x64.${{ steps.short-sha.outputs.short_sha }}.zip) +- [Windows](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-win32-ia32.short_sha.zip) +- [Mac](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-mac-darwin-x64.short_sha.zip) +- [Linux](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-linux-x64.short_sha.zip) ### Verify the app using GPG: 1. Download the ascii armored signature: -- [Windows](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-win32-ia32.${{ steps.short-sha.outputs.short_sha }}.zip.asc) -- [Mac](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-mac-darwin-x64.${{ steps.short-sha.outputs.short_sha }}.zip.asc) -- [Linux](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-linux-x64.${{ steps.short-sha.outputs.short_sha }}.zip.asc) +- [Windows](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-win32-ia32.short_sha.zip.asc) +- [Mac](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-mac-darwin-x64.short_sha.zip.asc) +- [Linux](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-linux-x64.short_sha.zip.asc) 3. Run this command on a directory that contains the apk file and and the ascii armored signature. `gpg --verify robosats-v0.8.1.alpha-....asc`