Skip to content

Commit 0852916

Browse files
committed
fix(slashpay): wait for LDK before updating config
1 parent 903f164 commit 0852916

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ module.exports = {
2222
'security',
2323
'send',
2424
'settings',
25+
'slashpay',
2526
'suggestions',
2627
'tokens',
2728
'transfer',

src/utils/slashtags/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
getSelectedNetwork,
1515
getSelectedWallet,
1616
} from '../wallet';
17-
import { decodeLightningInvoice } from '../lightning';
17+
import { decodeLightningInvoice, waitForLdk } from '../lightning';
1818
import { createLightningInvoice } from '../../store/actions/lightning';
1919
import { getSettingsStore } from '../../store/helpers';
2020
import { TAvailableNetworks } from '../networks';
@@ -188,6 +188,8 @@ export const updateSlashPayConfig = debounce(
188188
const payConfig: SlashPayConfig =
189189
(await drive.get('/slashpay.json').then(decodeJSON).catch(noop)) || [];
190190

191+
await waitForLdk();
192+
191193
const { currentLightningNode } = getCurrentWallet({
192194
selectedWallet,
193195
selectedNetwork,

0 commit comments

Comments
 (0)