Skip to content

Commit

Permalink
footer_change
Browse files Browse the repository at this point in the history
  • Loading branch information
SnehalSrivastava27 committed Aug 21, 2024
1 parent 96844d9 commit 1113114
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/components/BitcoinAmountInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ const BitcoinAmountInput = forwardRef(
inputMode={inputType.inputMode}
className={classNames('slashed-zeroes', className)}
value={
inputType.type === 'text'
? (field.value?.displayValue ?? '')
: String(field.value?.userRawInputValue ?? '')
inputType.type === 'text' ? field.value?.displayValue ?? '' : String(field.value?.userRawInputValue ?? '')
}
placeholder={placeholder}
min={displayInputUnit === 'BTC' ? '0.00000001' : '1'}
Expand Down
22 changes: 22 additions & 0 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { InfoModal } from './Modal'
import { isDebugFeatureEnabled, isDevMode } from '../constants/debugFeatures'
import { routes } from '../constants/routes'
import { toSemVer } from '../utils'
import { OrderbookOverlay } from './Orderbook'
import packageInfo from '../../package.json'

const APP_DISPLAY_VERSION = (() => {
Expand All @@ -29,6 +30,7 @@ export default function Footer() {

const [showBetaWarning, setShowBetaWarning] = useState(false)
const [showCheatsheet, setShowCheatsheet] = useState(false)
const [isShowOrderbook, setIsShowOrderbook] = useState(false)

const cheatsheetEnabled = useMemo(() => !!currentWallet, [currentWallet])
const websocketConnected = useMemo(() => websocketState === WebSocket.OPEN, [websocketState])
Expand Down Expand Up @@ -82,6 +84,26 @@ export default function Footer() {
</Trans>
</div>
</div>
<rb.Col className="d-flex justify-content-center">
<OrderbookOverlay
show={isShowOrderbook}
onHide={() => setIsShowOrderbook(false)}
nickname={serviceInfo?.nickname ?? undefined}
/>
<rb.Button
variant="outline-dark"
className="border-0 d-inline-flex align-items-center"
onClick={() => setIsShowOrderbook(true)}
style={{
backgroundColor: 'transparent',
borderColor: 'transparent',
color: 'inherit',
}}
>
<Sprite symbol="globe" width="24" height="24" className="me-2" />
{t('footer.orderbook')}
</rb.Button>
</rb.Col>
<div className="d-flex order-1 flex-1 flex-grow-0 justify-content-center align-items-center">
{cheatsheetEnabled && (
<>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Send/SendForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function CollaborativeTransactionOptions({
amount:
selectedAmount?.isSweep && sourceJarBalance
? sourceJarBalance.calculatedAvailableBalanceInSats
: (selectedAmount?.value ?? null),
: selectedAmount?.value ?? null,
numCollaborators: selectedNumCollaborators ?? null,
isCoinjoin: true,
})
Expand Down Expand Up @@ -134,8 +134,8 @@ function CollaborativeTransactionOptions({
numCollaborators={selectedNumCollaborators ?? null}
amount={
selectedAmount?.isSweep
? (sourceJarBalance?.calculatedAvailableBalanceInSats ?? null)
: (selectedAmount?.value ?? null)
? sourceJarBalance?.calculatedAvailableBalanceInSats ?? null
: selectedAmount?.value ?? null
}
onClick={() => {
setActiveFeeConfigModalSection('cj_fee')
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
"warning_alert_button_ok": "Fine with me.",
"cheatsheet": "Cheatsheet",
"websocket_connected": "Websocket connected",
"websocket_disconnected": "Websocket disconnected"
"websocket_disconnected": "Websocket disconnected",
"orderbook": "Orderbook"
},
"onboarding": {
"splashscreen_title": "Jam",
Expand Down

1 comment on commit 1113114

@SnehalSrivastava27
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitcoin amount and Form commits were made by running npm run format

Please sign in to comment.