mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 14:22:33 +01:00
chore: add maxFee to getRoute
This commit is contained in:
parent
098f541a33
commit
6416a64cde
2 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "thunderhub",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -12,6 +12,7 @@ export const getRoutes = {
|
|||
outgoing: { type: new GraphQLNonNull(GraphQLString) },
|
||||
incoming: { type: new GraphQLNonNull(GraphQLString) },
|
||||
tokens: { type: new GraphQLNonNull(GraphQLInt) },
|
||||
maxFee: { type: GraphQLInt },
|
||||
},
|
||||
resolve: async (root: any, params: any, context: any) => {
|
||||
await requestLimiter(context.ip, 'getRoutes');
|
||||
|
@ -26,6 +27,7 @@ export const getRoutes = {
|
|||
incoming_peer: params.incoming,
|
||||
destination: public_key,
|
||||
tokens: params.tokens,
|
||||
...(params.maxFee && { max_fee: params.maxFee }),
|
||||
}).catch((error: any) => {
|
||||
params.logger && logger.error('Error getting routes: %o', error);
|
||||
throw new Error(getErrorMsg(error));
|
||||
|
|
Loading…
Add table
Reference in a new issue