Skip to content

Commit

Permalink
chore: 🔧 lnd 10 support
Browse files Browse the repository at this point in the history
  • Loading branch information
apotdevin committed May 3, 2020
1 parent 892d1b3 commit 82296f3
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 225 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"graphql-tag": "^2.10.3",
"intersection-observer": "^0.8.0",
"isomorphic-unfetch": "^3.0.0",
"ln-service": "^47.16.0",
"ln-service": "^48.0.5",
"lodash.debounce": "^4.0.8",
"lodash.groupby": "^4.6.0",
"lodash.merge": "^4.6.2",
Expand Down
9 changes: 3 additions & 6 deletions src/api/helpers/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@ export const getAuthLnd = (auth: {
macaroon: string;
host: string;
}) => {
const encodedCert = auth.cert || '';
const encodedMacaroon = auth.macaroon || '';
const cert = auth.cert || '';
const macaroon = auth.macaroon || '';
const socket = auth.host || '';

const cert = encodedCert;
const macaroon = encodedMacaroon;

const params = {
macaroon,
socket,
...(encodedCert !== '' ? { cert } : {}),
...(cert !== '' ? { cert } : {}),
};

const { lnd } = authenticatedLndGrpc(params);
Expand Down
2 changes: 1 addition & 1 deletion src/api/schemas/mutations/chat/sendMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const sendMessage = {
sender: userKey,
alias: userAlias,
contentType: params.messageType || 'text',
requestType: '',
requestType: params.messageType || 'text',
signature,
secret,
});
Expand Down
4 changes: 3 additions & 1 deletion src/utils/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const getMessage = error => {
return 'This node does not accept keysend payments.';
case 'FailedToFindPayableRouteToDestination':
case 'NoRouteFound':
return 'Did not find a route to this node. Try opening a direct channel to them with sufficient liquidity.';
return 'Did not find a possible route.';
case 'SendPaymentFail':
return 'Failed to send this payments.';
default:
return error;
}
Expand Down
1 change: 1 addition & 0 deletions src/views/home/account/pay/pay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export const PayCard = ({ setOpen }: { setOpen: () => void }) => {
</Sub4Title>
</NoWrapTitle>
<Input
value={request}
placeholder={
canKeysend ? 'Lightning Invoice or Public Key' : 'Invoice'
}
Expand Down
Loading

0 comments on commit 82296f3

Please sign in to comment.