mirror of
https://github.com/KoalaSat/nostros.git
synced 2024-09-28 22:30:41 +00:00
Fix (#460)
This commit is contained in:
commit
1a24a79b2d
@ -23,7 +23,7 @@ export const LnPreview: React.FC<LnPreviewProps> = ({
|
||||
}) => {
|
||||
const theme = useTheme()
|
||||
const { t } = useTranslation('common')
|
||||
const { active, payInvoice } = React.useContext(WalletContext)
|
||||
const { type, payInvoice } = React.useContext(WalletContext)
|
||||
const { getSatoshiSymbol } = React.useContext(AppContext)
|
||||
const bottomSheetInvoiceRef = React.useRef<RBSheet>(null)
|
||||
const [decodedLnUrl, setDecodedLnUrl] = useState<
|
||||
@ -107,7 +107,7 @@ export const LnPreview: React.FC<LnPreviewProps> = ({
|
||||
<IconButton icon='content-copy' size={28} onPress={copyInvoice} />
|
||||
<Text>{t('lnPayment.copy')}</Text>
|
||||
</View>
|
||||
{active && (
|
||||
{type && (
|
||||
<View style={styles.actionButton}>
|
||||
<IconButton icon='wallet' size={28} onPress={payWithWallet} />
|
||||
<Text>{t('lnPayment.pay')}</Text>
|
||||
|
@ -87,12 +87,9 @@ export const WalletContextProvider = ({ children }: WalletContextProviderProps):
|
||||
}
|
||||
|
||||
const updateWallet: () => Promise<void> = async () => {
|
||||
console.log('config', config)
|
||||
console.log('type', type)
|
||||
if (!config || !type) return
|
||||
|
||||
const client = getClient()
|
||||
console.log('client', client)
|
||||
if (client) {
|
||||
client.getBalance().then((response) => {
|
||||
if (response?.status === 200) {
|
||||
|
Loading…
Reference in New Issue
Block a user