Skip to content

Commit

Permalink
Fix (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat authored Mar 22, 2023
2 parents fdb21cd + 50dd2d4 commit 1a24a79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions frontend/Components/LnPreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand Down Expand Up @@ -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>
Expand Down
3 changes: 0 additions & 3 deletions frontend/Contexts/WalletContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1a24a79

Please sign in to comment.