This commit is contained in:
KoalaSat 2023-03-22 17:48:14 +01:00
parent 0a424fcf61
commit 50dd2d47a0
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157
2 changed files with 2 additions and 5 deletions

View File

@ -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>

View File

@ -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) {