This repository was archived by the owner on Apr 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ import { FeesModal } from "~/components/MoreInfoModal";
5
5
import { useI18n } from "~/i18n/context" ;
6
6
import { useMegaStore } from "~/state/megaStore" ;
7
7
8
- export function ReceiveWarnings ( props : { amountSats : string | bigint } ) {
8
+ export function ReceiveWarnings ( props : {
9
+ amountSats : string | bigint ;
10
+ from_fedi_to_ln : boolean ;
11
+ } ) {
9
12
const i18n = useI18n ( ) ;
10
13
const [ state , _actions ] = useMegaStore ( ) ;
11
14
@@ -26,7 +29,7 @@ export function ReceiveWarnings(props: { amountSats: string | bigint }) {
26
29
} ) ;
27
30
28
31
const warningText = ( ) => {
29
- if ( state . federations ?. length !== 0 ) {
32
+ if ( state . federations ?. length !== 0 && props . from_fedi_to_ln != true ) {
30
33
return undefined ;
31
34
}
32
35
if ( ( state . balance ?. lightning || 0n ) === 0n ) {
Original file line number Diff line number Diff line change @@ -377,7 +377,10 @@ export function Receive() {
377
377
setAmountSats = { setAmount }
378
378
onSubmit = { getQr }
379
379
/>
380
- < ReceiveWarnings amountSats = { amount ( ) || "0" } />
380
+ < ReceiveWarnings
381
+ amountSats = { amount ( ) || "0" }
382
+ from_fedi_to_ln = { false }
383
+ />
381
384
</ VStack >
382
385
< div class = "flex-1" />
383
386
< VStack >
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
28
28
MegaEx ,
29
29
MutinyWalletGuard ,
30
30
NavBar ,
31
+ ReceiveWarnings ,
31
32
showToast ,
32
33
SuccessModal ,
33
34
TextField ,
@@ -205,6 +206,10 @@ export function SwapLightning() {
205
206
}
206
207
] }
207
208
/>
209
+ < ReceiveWarnings
210
+ amountSats = { amountSats ( ) || "0" }
211
+ from_fedi_to_ln = { true }
212
+ />
208
213
< Show when = { amountWarning ( ) && amountSats ( ) > 0n } >
209
214
< InfoBox accent = { "red" } > { amountWarning ( ) } </ InfoBox >
210
215
</ Show >
You can’t perform that action at this time.
0 commit comments