mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
feat: add option to edit fee while withdrawing (#1044)
* feat: add option to edit fee while withdrawing * chore: add alert if fee rate exceeds fastest fee * fix: tests * feat: add support for LDK * chore: do not accept decimal fee rates in frontend * chore: minor withdraw UI improvements * chore: make fee rate optional and update mockery * chore: remove unnecessary else * chore: do not format lottie files * feat: add lotties files to prettier ignore --------- Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
This commit is contained in:
parent
9bc35aba00
commit
9b6e88f1cc
16 changed files with 734 additions and 169 deletions
|
|
@ -0,0 +1 @@
|
|||
frontend/src/assets/lotties
|
||||
|
|
@ -115,8 +115,6 @@ Note that the PostgreSQL user account must be granted appropriate permissions to
|
|||
|
||||
We use [testify/mock](https://github.com/stretchr/testify) to facilitate mocking in tests. Instead of writing mocks manually, we generate them using [vektra/mockery](https://github.com/vektra/mockery). To regenerate them, [install mockery](https://vektra.github.io/mockery/latest/installation) and run it in the project's root directory:
|
||||
|
||||
> Use `go install github.com/vektra/mockery/v2@v2.52.1` as go 1.24.0 is currently not supported by Alby Hub.
|
||||
|
||||
$ mockery
|
||||
|
||||
Mockery loads its configuration from the .mockery.yaml file in the root directory of this project. To add mocks for new interfaces, add them to the configuration file and run mockery.
|
||||
|
|
|
|||
|
|
@ -755,11 +755,11 @@ func (api *api) SignMessage(ctx context.Context, message string) (*SignMessageRe
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (api *api) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, sendAll bool) (*RedeemOnchainFundsResponse, error) {
|
||||
func (api *api) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, feeRate *uint64, sendAll bool) (*RedeemOnchainFundsResponse, error) {
|
||||
if api.svc.GetLNClient() == nil {
|
||||
return nil, errors.New("LNClient not started")
|
||||
}
|
||||
txId, err := api.svc.GetLNClient().RedeemOnchainFunds(ctx, toAddress, amount, sendAll)
|
||||
txId, err := api.svc.GetLNClient().RedeemOnchainFunds(ctx, toAddress, amount, feeRate, sendAll)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ type API interface {
|
|||
GetNewOnchainAddress(ctx context.Context) (string, error)
|
||||
GetUnusedOnchainAddress(ctx context.Context) (string, error)
|
||||
SignMessage(ctx context.Context, message string) (*SignMessageResponse, error)
|
||||
RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, sendAll bool) (*RedeemOnchainFundsResponse, error)
|
||||
RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, feeRate *uint64, sendAll bool) (*RedeemOnchainFundsResponse, error)
|
||||
GetBalances(ctx context.Context) (*BalancesResponse, error)
|
||||
ListTransactions(ctx context.Context, appId *uint, limit uint64, offset uint64) (*ListTransactionsResponse, error)
|
||||
ListOnchainTransactions(ctx context.Context) ([]lnclient.OnchainTransaction, error)
|
||||
|
|
@ -237,6 +237,7 @@ type UpdateChannelRequest = lnclient.UpdateChannelRequest
|
|||
type RedeemOnchainFundsRequest struct {
|
||||
ToAddress string `json:"toAddress"`
|
||||
Amount uint64 `json:"amount"`
|
||||
FeeRate *uint64 `json:"feeRate"`
|
||||
SendAll bool `json:"sendAll"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
import { AlertTriangleIcon, CopyIcon, ExternalLinkIcon } from "lucide-react";
|
||||
import {
|
||||
AlertTriangleIcon,
|
||||
ChevronDown,
|
||||
CopyIcon,
|
||||
ExternalLinkIcon,
|
||||
} from "lucide-react";
|
||||
import React from "react";
|
||||
import AppHeader from "src/components/AppHeader";
|
||||
import ExternalLink from "src/components/ExternalLink";
|
||||
|
|
@ -23,6 +28,8 @@ import { useToast } from "src/components/ui/use-toast";
|
|||
import { ONCHAIN_DUST_SATS } from "src/constants";
|
||||
import { useBalances } from "src/hooks/useBalances";
|
||||
import { useChannels } from "src/hooks/useChannels";
|
||||
import { useInfo } from "src/hooks/useInfo";
|
||||
import { useMempoolApi } from "src/hooks/useMempoolApi";
|
||||
|
||||
import { copyToClipboard } from "src/lib/clipboard";
|
||||
import { RedeemOnchainFundsResponse } from "src/types";
|
||||
|
|
@ -31,11 +38,20 @@ import { request } from "src/utils/request";
|
|||
export default function WithdrawOnchainFunds() {
|
||||
const [isLoading, setLoading] = React.useState(false);
|
||||
const { toast } = useToast();
|
||||
const { data: info } = useInfo();
|
||||
const { data: balances } = useBalances();
|
||||
const { data: recommendedFees } = useMempoolApi<{
|
||||
fastestFee: number;
|
||||
halfHourFee: number;
|
||||
economyFee: number;
|
||||
minimumFee: number;
|
||||
}>("/v1/fees/recommended");
|
||||
const { data: channels } = useChannels();
|
||||
const [onchainAddress, setOnchainAddress] = React.useState("");
|
||||
const [amount, setAmount] = React.useState("");
|
||||
const [feeRate, setFeeRate] = React.useState("");
|
||||
const [sendAll, setSendAll] = React.useState(false);
|
||||
const [showAdvanced, setShowAdvanced] = React.useState(false);
|
||||
const [transactionId, setTransactionId] = React.useState("");
|
||||
const [confirmDialogOpen, setConfirmDialogOpen] = React.useState(false);
|
||||
|
||||
|
|
@ -73,6 +89,7 @@ export default function WithdrawOnchainFunds() {
|
|||
toAddress: onchainAddress,
|
||||
amount: +amount,
|
||||
sendAll,
|
||||
...(feeRate && { feeRate: +feeRate }),
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
|
@ -90,7 +107,7 @@ export default function WithdrawOnchainFunds() {
|
|||
});
|
||||
}
|
||||
setLoading(false);
|
||||
}, [amount, onchainAddress, sendAll, toast]);
|
||||
}, [amount, feeRate, onchainAddress, sendAll, toast]);
|
||||
|
||||
if (transactionId) {
|
||||
return (
|
||||
|
|
@ -123,7 +140,7 @@ export default function WithdrawOnchainFunds() {
|
|||
);
|
||||
}
|
||||
|
||||
if (!balances) {
|
||||
if (!info || !balances || !recommendedFees) {
|
||||
return <Loading />;
|
||||
}
|
||||
|
||||
|
|
@ -226,12 +243,72 @@ export default function WithdrawOnchainFunds() {
|
|||
setOnchainAddress(e.target.value);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Please double-check the destination address. This transaction cannot
|
||||
be reversed.
|
||||
<p className="mt-2 text-sm text-muted-foreground">
|
||||
Please double-check the destination address. This transaction
|
||||
cannot be reversed.
|
||||
</p>
|
||||
</div>
|
||||
{(info?.backendType === "LDK" || info?.backendType === "LND") && (
|
||||
<>
|
||||
{showAdvanced && (
|
||||
<div className="">
|
||||
<Label htmlFor="fee-rate">Fee Rate (Sat/vB)</Label>
|
||||
<Input
|
||||
id="fee-rate"
|
||||
type="number"
|
||||
value={feeRate}
|
||||
step={1}
|
||||
required
|
||||
min={recommendedFees.minimumFee}
|
||||
onChange={(e) => {
|
||||
setFeeRate(e.target.value);
|
||||
}}
|
||||
/>
|
||||
<p className="text-muted-foreground text-sm mt-4">
|
||||
<Button
|
||||
size="sm"
|
||||
variant="positive"
|
||||
className="rounded-full"
|
||||
type="button"
|
||||
onClick={() =>
|
||||
setFeeRate(recommendedFees.economyFee.toString())
|
||||
}
|
||||
>
|
||||
Low priority: {recommendedFees.economyFee}
|
||||
</Button>{" "}
|
||||
<Button
|
||||
size="sm"
|
||||
variant="positive"
|
||||
className="rounded-full"
|
||||
type="button"
|
||||
onClick={() =>
|
||||
setFeeRate(recommendedFees.fastestFee.toString())
|
||||
}
|
||||
>
|
||||
High priority: {recommendedFees.fastestFee}
|
||||
</Button>{" "}
|
||||
<ExternalLink
|
||||
to="https://mempool.space"
|
||||
className="underline ml-2"
|
||||
>
|
||||
mempool.space
|
||||
</ExternalLink>
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
{!showAdvanced && (
|
||||
<Button
|
||||
type="button"
|
||||
variant="link"
|
||||
className="text-muted-foreground text-xs"
|
||||
onClick={() => setShowAdvanced((current) => !current)}
|
||||
>
|
||||
<ChevronDown className="w-4 h-4 mr-2" />
|
||||
Advanced Options
|
||||
</Button>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<AlertDialog
|
||||
|
|
|
|||
|
|
@ -813,7 +813,7 @@ func (httpSvc *HttpService) redeemOnchainFundsHandler(c echo.Context) error {
|
|||
})
|
||||
}
|
||||
|
||||
redeemOnchainFundsResponse, err := httpSvc.api.RedeemOnchainFunds(ctx, redeemOnchainFundsRequest.ToAddress, redeemOnchainFundsRequest.Amount, redeemOnchainFundsRequest.SendAll)
|
||||
redeemOnchainFundsResponse, err := httpSvc.api.RedeemOnchainFunds(ctx, redeemOnchainFundsRequest.ToAddress, redeemOnchainFundsRequest.Amount, redeemOnchainFundsRequest.FeeRate, redeemOnchainFundsRequest.SendAll)
|
||||
|
||||
if err != nil {
|
||||
return c.JSON(http.StatusInternalServerError, ErrorResponse{
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ func (cs *CashuService) GetOnchainBalance(ctx context.Context) (*lnclient.Onchai
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (cs *CashuService) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, sendAll bool) (string, error) {
|
||||
func (cs *CashuService) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, feeRate *uint64, sendAll bool) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1195,11 +1195,17 @@ func (ls *LDKService) GetOnchainBalance(ctx context.Context) (*lnclient.OnchainB
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (ls *LDKService) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, sendAll bool) (string, error) {
|
||||
func (ls *LDKService) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, feeRate *uint64, sendAll bool) (string, error) {
|
||||
var feePtr **ldk_node.FeeRate
|
||||
if feeRate != nil {
|
||||
fee := ldk_node.FeeRateFromSatPerVbUnchecked(*feeRate)
|
||||
feePtr = &fee
|
||||
}
|
||||
|
||||
if !sendAll {
|
||||
// NOTE: this may fail if user does not reserve enough for the onchain transaction
|
||||
// and can also drain the anchor reserves if the user provides a too high amount.
|
||||
txId, err := checkLDKErr(ls.node.OnchainPayment().SendToAddress(toAddress, amount, nil))
|
||||
txId, err := checkLDKErr(ls.node.OnchainPayment().SendToAddress(toAddress, amount, feePtr))
|
||||
if err != nil {
|
||||
logger.Logger.WithError(err).Error("SendToAddress failed")
|
||||
return "", err
|
||||
|
|
@ -1207,7 +1213,7 @@ func (ls *LDKService) RedeemOnchainFunds(ctx context.Context, toAddress string,
|
|||
return txId, nil
|
||||
}
|
||||
|
||||
txId, err := checkLDKErr(ls.node.OnchainPayment().SendAllToAddress(toAddress, false, nil))
|
||||
txId, err := checkLDKErr(ls.node.OnchainPayment().SendAllToAddress(toAddress, false, feePtr))
|
||||
if err != nil {
|
||||
logger.Logger.WithError(err).Error("SendAllToAddress failed")
|
||||
return "", err
|
||||
|
|
|
|||
|
|
@ -1219,13 +1219,20 @@ func (svc *LNDService) GetOnchainBalance(ctx context.Context) (*lnclient.Onchain
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (svc *LNDService) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, sendAll bool) (txId string, err error) {
|
||||
resp, err := svc.client.SendCoins(ctx, &lnrpc.SendCoinsRequest{
|
||||
func (svc *LNDService) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, feeRate *uint64, sendAll bool) (txId string, err error) {
|
||||
sendCoinsRequest := &lnrpc.SendCoinsRequest{
|
||||
Addr: toAddress,
|
||||
SendAll: sendAll,
|
||||
Amount: int64(amount),
|
||||
TargetConf: 1,
|
||||
})
|
||||
}
|
||||
|
||||
if feeRate != nil {
|
||||
sendCoinsRequest.SatPerVbyte = *feeRate
|
||||
} else {
|
||||
sendCoinsRequest.TargetConf = 1
|
||||
}
|
||||
|
||||
resp, err := svc.client.SendCoins(ctx, sendCoinsRequest)
|
||||
if err != nil {
|
||||
logger.Logger.WithError(err).Error("Failed to send onchain funds")
|
||||
return "", err
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ type LNClient interface {
|
|||
ResetRouter(key string) error
|
||||
GetOnchainBalance(ctx context.Context) (*OnchainBalanceResponse, error)
|
||||
GetBalances(ctx context.Context, includeInactiveChannels bool) (*BalancesResponse, error)
|
||||
RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, sendAll bool) (txId string, err error)
|
||||
RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, feeRate *uint64, sendAll bool) (txId string, err error)
|
||||
SendPaymentProbes(ctx context.Context, invoice string) error
|
||||
SendSpontaneousPaymentProbes(ctx context.Context, amountMsat uint64, nodeId string) error
|
||||
ListPeers(ctx context.Context) ([]PeerDetails, error)
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ func (svc *PhoenixService) SendKeysend(ctx context.Context, amount uint64, desti
|
|||
return nil, errors.New("not implemented")
|
||||
}
|
||||
|
||||
func (svc *PhoenixService) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, sendAll bool) (txId string, err error) {
|
||||
func (svc *PhoenixService) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, feeRate *uint64, sendAll bool) (txId string, err error) {
|
||||
return "", errors.New("not implemented")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ func (mln *MockLn) GetBalances(ctx context.Context, includeInactiveChannels bool
|
|||
func (mln *MockLn) GetOnchainBalance(ctx context.Context) (*lnclient.OnchainBalanceResponse, error) {
|
||||
return nil, nil
|
||||
}
|
||||
func (mln *MockLn) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, sendAll bool) (txId string, err error) {
|
||||
func (mln *MockLn) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, feeRate *uint64, sendAll bool) (txId string, err error) {
|
||||
return "", nil
|
||||
}
|
||||
func (mln *MockLn) ResetRouter(key string) error {
|
||||
|
|
|
|||
|
|
@ -59,15 +59,26 @@ type MockConfig_ChangeUnlockPassword_Call struct {
|
|||
}
|
||||
|
||||
// ChangeUnlockPassword is a helper method to define mock.On call
|
||||
// - currentUnlockPassword
|
||||
// - newUnlockPassword
|
||||
// - currentUnlockPassword string
|
||||
// - newUnlockPassword string
|
||||
func (_e *MockConfig_Expecter) ChangeUnlockPassword(currentUnlockPassword interface{}, newUnlockPassword interface{}) *MockConfig_ChangeUnlockPassword_Call {
|
||||
return &MockConfig_ChangeUnlockPassword_Call{Call: _e.mock.On("ChangeUnlockPassword", currentUnlockPassword, newUnlockPassword)}
|
||||
}
|
||||
|
||||
func (_c *MockConfig_ChangeUnlockPassword_Call) Run(run func(currentUnlockPassword string, newUnlockPassword string)) *MockConfig_ChangeUnlockPassword_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string), args[1].(string))
|
||||
var arg0 string
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(string)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -105,14 +116,20 @@ type MockConfig_CheckUnlockPassword_Call struct {
|
|||
}
|
||||
|
||||
// CheckUnlockPassword is a helper method to define mock.On call
|
||||
// - password
|
||||
// - password string
|
||||
func (_e *MockConfig_Expecter) CheckUnlockPassword(password interface{}) *MockConfig_CheckUnlockPassword_Call {
|
||||
return &MockConfig_CheckUnlockPassword_Call{Call: _e.mock.On("CheckUnlockPassword", password)}
|
||||
}
|
||||
|
||||
func (_c *MockConfig_CheckUnlockPassword_Call) Run(run func(password string)) *MockConfig_CheckUnlockPassword_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string))
|
||||
var arg0 string
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -159,15 +176,26 @@ type MockConfig_Get_Call struct {
|
|||
}
|
||||
|
||||
// Get is a helper method to define mock.On call
|
||||
// - key
|
||||
// - encryptionKey
|
||||
// - key string
|
||||
// - encryptionKey string
|
||||
func (_e *MockConfig_Expecter) Get(key interface{}, encryptionKey interface{}) *MockConfig_Get_Call {
|
||||
return &MockConfig_Get_Call{Call: _e.mock.On("Get", key, encryptionKey)}
|
||||
}
|
||||
|
||||
func (_c *MockConfig_Get_Call) Run(run func(key string, encryptionKey string)) *MockConfig_Get_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string), args[1].(string))
|
||||
var arg0 string
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(string)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -427,14 +455,20 @@ type MockConfig_SaveUnlockPasswordCheck_Call struct {
|
|||
}
|
||||
|
||||
// SaveUnlockPasswordCheck is a helper method to define mock.On call
|
||||
// - encryptionKey
|
||||
// - encryptionKey string
|
||||
func (_e *MockConfig_Expecter) SaveUnlockPasswordCheck(encryptionKey interface{}) *MockConfig_SaveUnlockPasswordCheck_Call {
|
||||
return &MockConfig_SaveUnlockPasswordCheck_Call{Call: _e.mock.On("SaveUnlockPasswordCheck", encryptionKey)}
|
||||
}
|
||||
|
||||
func (_c *MockConfig_SaveUnlockPasswordCheck_Call) Run(run func(encryptionKey string)) *MockConfig_SaveUnlockPasswordCheck_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string))
|
||||
var arg0 string
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -472,14 +506,20 @@ type MockConfig_SetAutoUnlockPassword_Call struct {
|
|||
}
|
||||
|
||||
// SetAutoUnlockPassword is a helper method to define mock.On call
|
||||
// - unlockPassword
|
||||
// - unlockPassword string
|
||||
func (_e *MockConfig_Expecter) SetAutoUnlockPassword(unlockPassword interface{}) *MockConfig_SetAutoUnlockPassword_Call {
|
||||
return &MockConfig_SetAutoUnlockPassword_Call{Call: _e.mock.On("SetAutoUnlockPassword", unlockPassword)}
|
||||
}
|
||||
|
||||
func (_c *MockConfig_SetAutoUnlockPassword_Call) Run(run func(unlockPassword string)) *MockConfig_SetAutoUnlockPassword_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string))
|
||||
var arg0 string
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -517,14 +557,20 @@ type MockConfig_SetCurrency_Call struct {
|
|||
}
|
||||
|
||||
// SetCurrency is a helper method to define mock.On call
|
||||
// - value
|
||||
// - value string
|
||||
func (_e *MockConfig_Expecter) SetCurrency(value interface{}) *MockConfig_SetCurrency_Call {
|
||||
return &MockConfig_SetCurrency_Call{Call: _e.mock.On("SetCurrency", value)}
|
||||
}
|
||||
|
||||
func (_c *MockConfig_SetCurrency_Call) Run(run func(value string)) *MockConfig_SetCurrency_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string))
|
||||
var arg0 string
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -562,16 +608,32 @@ type MockConfig_SetIgnore_Call struct {
|
|||
}
|
||||
|
||||
// SetIgnore is a helper method to define mock.On call
|
||||
// - key
|
||||
// - value
|
||||
// - encryptionKey
|
||||
// - key string
|
||||
// - value string
|
||||
// - encryptionKey string
|
||||
func (_e *MockConfig_Expecter) SetIgnore(key interface{}, value interface{}, encryptionKey interface{}) *MockConfig_SetIgnore_Call {
|
||||
return &MockConfig_SetIgnore_Call{Call: _e.mock.On("SetIgnore", key, value, encryptionKey)}
|
||||
}
|
||||
|
||||
func (_c *MockConfig_SetIgnore_Call) Run(run func(key string, value string, encryptionKey string)) *MockConfig_SetIgnore_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string), args[1].(string), args[2].(string))
|
||||
var arg0 string
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(string)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
var arg2 string
|
||||
if args[2] != nil {
|
||||
arg2 = args[2].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -609,16 +671,32 @@ type MockConfig_SetUpdate_Call struct {
|
|||
}
|
||||
|
||||
// SetUpdate is a helper method to define mock.On call
|
||||
// - key
|
||||
// - value
|
||||
// - encryptionKey
|
||||
// - key string
|
||||
// - value string
|
||||
// - encryptionKey string
|
||||
func (_e *MockConfig_Expecter) SetUpdate(key interface{}, value interface{}, encryptionKey interface{}) *MockConfig_SetUpdate_Call {
|
||||
return &MockConfig_SetUpdate_Call{Call: _e.mock.On("SetUpdate", key, value, encryptionKey)}
|
||||
}
|
||||
|
||||
func (_c *MockConfig_SetUpdate_Call) Run(run func(key string, value string, encryptionKey string)) *MockConfig_SetUpdate_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string), args[1].(string), args[2].(string))
|
||||
var arg0 string
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(string)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
var arg2 string
|
||||
if args[2] != nil {
|
||||
arg2 = args[2].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,15 +61,26 @@ type MockLNClient_CancelHoldInvoice_Call struct {
|
|||
}
|
||||
|
||||
// CancelHoldInvoice is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - paymentHash
|
||||
// - ctx context.Context
|
||||
// - paymentHash string
|
||||
func (_e *MockLNClient_Expecter) CancelHoldInvoice(ctx interface{}, paymentHash interface{}) *MockLNClient_CancelHoldInvoice_Call {
|
||||
return &MockLNClient_CancelHoldInvoice_Call{Call: _e.mock.On("CancelHoldInvoice", ctx, paymentHash)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_CancelHoldInvoice_Call) Run(run func(ctx context.Context, paymentHash string)) *MockLNClient_CancelHoldInvoice_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -118,15 +129,26 @@ type MockLNClient_CloseChannel_Call struct {
|
|||
}
|
||||
|
||||
// CloseChannel is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - closeChannelRequest
|
||||
// - ctx context.Context
|
||||
// - closeChannelRequest *lnclient.CloseChannelRequest
|
||||
func (_e *MockLNClient_Expecter) CloseChannel(ctx interface{}, closeChannelRequest interface{}) *MockLNClient_CloseChannel_Call {
|
||||
return &MockLNClient_CloseChannel_Call{Call: _e.mock.On("CloseChannel", ctx, closeChannelRequest)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_CloseChannel_Call) Run(run func(ctx context.Context, closeChannelRequest *lnclient.CloseChannelRequest)) *MockLNClient_CloseChannel_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*lnclient.CloseChannelRequest))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 *lnclient.CloseChannelRequest
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*lnclient.CloseChannelRequest)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -164,15 +186,26 @@ type MockLNClient_ConnectPeer_Call struct {
|
|||
}
|
||||
|
||||
// ConnectPeer is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - connectPeerRequest
|
||||
// - ctx context.Context
|
||||
// - connectPeerRequest *lnclient.ConnectPeerRequest
|
||||
func (_e *MockLNClient_Expecter) ConnectPeer(ctx interface{}, connectPeerRequest interface{}) *MockLNClient_ConnectPeer_Call {
|
||||
return &MockLNClient_ConnectPeer_Call{Call: _e.mock.On("ConnectPeer", ctx, connectPeerRequest)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_ConnectPeer_Call) Run(run func(ctx context.Context, connectPeerRequest *lnclient.ConnectPeerRequest)) *MockLNClient_ConnectPeer_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*lnclient.ConnectPeerRequest))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 *lnclient.ConnectPeerRequest
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*lnclient.ConnectPeerRequest)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -210,15 +243,26 @@ type MockLNClient_DisconnectPeer_Call struct {
|
|||
}
|
||||
|
||||
// DisconnectPeer is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - peerId
|
||||
// - ctx context.Context
|
||||
// - peerId string
|
||||
func (_e *MockLNClient_Expecter) DisconnectPeer(ctx interface{}, peerId interface{}) *MockLNClient_DisconnectPeer_Call {
|
||||
return &MockLNClient_DisconnectPeer_Call{Call: _e.mock.On("DisconnectPeer", ctx, peerId)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_DisconnectPeer_Call) Run(run func(ctx context.Context, peerId string)) *MockLNClient_DisconnectPeer_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -267,15 +311,26 @@ type MockLNClient_ExecuteCustomNodeCommand_Call struct {
|
|||
}
|
||||
|
||||
// ExecuteCustomNodeCommand is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - command
|
||||
// - ctx context.Context
|
||||
// - command *lnclient.CustomNodeCommandRequest
|
||||
func (_e *MockLNClient_Expecter) ExecuteCustomNodeCommand(ctx interface{}, command interface{}) *MockLNClient_ExecuteCustomNodeCommand_Call {
|
||||
return &MockLNClient_ExecuteCustomNodeCommand_Call{Call: _e.mock.On("ExecuteCustomNodeCommand", ctx, command)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_ExecuteCustomNodeCommand_Call) Run(run func(ctx context.Context, command *lnclient.CustomNodeCommandRequest)) *MockLNClient_ExecuteCustomNodeCommand_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*lnclient.CustomNodeCommandRequest))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 *lnclient.CustomNodeCommandRequest
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*lnclient.CustomNodeCommandRequest)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -324,15 +379,26 @@ type MockLNClient_GetBalances_Call struct {
|
|||
}
|
||||
|
||||
// GetBalances is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - includeInactiveChannels
|
||||
// - ctx context.Context
|
||||
// - includeInactiveChannels bool
|
||||
func (_e *MockLNClient_Expecter) GetBalances(ctx interface{}, includeInactiveChannels interface{}) *MockLNClient_GetBalances_Call {
|
||||
return &MockLNClient_GetBalances_Call{Call: _e.mock.On("GetBalances", ctx, includeInactiveChannels)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_GetBalances_Call) Run(run func(ctx context.Context, includeInactiveChannels bool)) *MockLNClient_GetBalances_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(bool))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 bool
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(bool)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -427,14 +493,20 @@ type MockLNClient_GetInfo_Call struct {
|
|||
}
|
||||
|
||||
// GetInfo is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - ctx context.Context
|
||||
func (_e *MockLNClient_Expecter) GetInfo(ctx interface{}) *MockLNClient_GetInfo_Call {
|
||||
return &MockLNClient_GetInfo_Call{Call: _e.mock.On("GetInfo", ctx)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_GetInfo_Call) Run(run func(ctx context.Context)) *MockLNClient_GetInfo_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -483,15 +555,26 @@ type MockLNClient_GetLogOutput_Call struct {
|
|||
}
|
||||
|
||||
// GetLogOutput is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - maxLen
|
||||
// - ctx context.Context
|
||||
// - maxLen int
|
||||
func (_e *MockLNClient_Expecter) GetLogOutput(ctx interface{}, maxLen interface{}) *MockLNClient_GetLogOutput_Call {
|
||||
return &MockLNClient_GetLogOutput_Call{Call: _e.mock.On("GetLogOutput", ctx, maxLen)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_GetLogOutput_Call) Run(run func(ctx context.Context, maxLen int)) *MockLNClient_GetLogOutput_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(int))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 int
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(int)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -540,15 +623,26 @@ type MockLNClient_GetNetworkGraph_Call struct {
|
|||
}
|
||||
|
||||
// GetNetworkGraph is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - nodeIds
|
||||
// - ctx context.Context
|
||||
// - nodeIds []string
|
||||
func (_e *MockLNClient_Expecter) GetNetworkGraph(ctx interface{}, nodeIds interface{}) *MockLNClient_GetNetworkGraph_Call {
|
||||
return &MockLNClient_GetNetworkGraph_Call{Call: _e.mock.On("GetNetworkGraph", ctx, nodeIds)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_GetNetworkGraph_Call) Run(run func(ctx context.Context, nodeIds []string)) *MockLNClient_GetNetworkGraph_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].([]string))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 []string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].([]string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -595,14 +689,20 @@ type MockLNClient_GetNewOnchainAddress_Call struct {
|
|||
}
|
||||
|
||||
// GetNewOnchainAddress is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - ctx context.Context
|
||||
func (_e *MockLNClient_Expecter) GetNewOnchainAddress(ctx interface{}) *MockLNClient_GetNewOnchainAddress_Call {
|
||||
return &MockLNClient_GetNewOnchainAddress_Call{Call: _e.mock.On("GetNewOnchainAddress", ctx)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_GetNewOnchainAddress_Call) Run(run func(ctx context.Context)) *MockLNClient_GetNewOnchainAddress_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -651,14 +751,20 @@ type MockLNClient_GetNodeConnectionInfo_Call struct {
|
|||
}
|
||||
|
||||
// GetNodeConnectionInfo is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - ctx context.Context
|
||||
func (_e *MockLNClient_Expecter) GetNodeConnectionInfo(ctx interface{}) *MockLNClient_GetNodeConnectionInfo_Call {
|
||||
return &MockLNClient_GetNodeConnectionInfo_Call{Call: _e.mock.On("GetNodeConnectionInfo", ctx)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_GetNodeConnectionInfo_Call) Run(run func(ctx context.Context)) *MockLNClient_GetNodeConnectionInfo_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -707,14 +813,20 @@ type MockLNClient_GetNodeStatus_Call struct {
|
|||
}
|
||||
|
||||
// GetNodeStatus is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - ctx context.Context
|
||||
func (_e *MockLNClient_Expecter) GetNodeStatus(ctx interface{}) *MockLNClient_GetNodeStatus_Call {
|
||||
return &MockLNClient_GetNodeStatus_Call{Call: _e.mock.On("GetNodeStatus", ctx)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_GetNodeStatus_Call) Run(run func(ctx context.Context)) *MockLNClient_GetNodeStatus_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -763,14 +875,20 @@ type MockLNClient_GetOnchainBalance_Call struct {
|
|||
}
|
||||
|
||||
// GetOnchainBalance is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - ctx context.Context
|
||||
func (_e *MockLNClient_Expecter) GetOnchainBalance(ctx interface{}) *MockLNClient_GetOnchainBalance_Call {
|
||||
return &MockLNClient_GetOnchainBalance_Call{Call: _e.mock.On("GetOnchainBalance", ctx)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_GetOnchainBalance_Call) Run(run func(ctx context.Context)) *MockLNClient_GetOnchainBalance_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1008,14 +1126,20 @@ type MockLNClient_ListChannels_Call struct {
|
|||
}
|
||||
|
||||
// ListChannels is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - ctx context.Context
|
||||
func (_e *MockLNClient_Expecter) ListChannels(ctx interface{}) *MockLNClient_ListChannels_Call {
|
||||
return &MockLNClient_ListChannels_Call{Call: _e.mock.On("ListChannels", ctx)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_ListChannels_Call) Run(run func(ctx context.Context)) *MockLNClient_ListChannels_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1064,14 +1188,20 @@ type MockLNClient_ListOnchainTransactions_Call struct {
|
|||
}
|
||||
|
||||
// ListOnchainTransactions is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - ctx context.Context
|
||||
func (_e *MockLNClient_Expecter) ListOnchainTransactions(ctx interface{}) *MockLNClient_ListOnchainTransactions_Call {
|
||||
return &MockLNClient_ListOnchainTransactions_Call{Call: _e.mock.On("ListOnchainTransactions", ctx)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_ListOnchainTransactions_Call) Run(run func(ctx context.Context)) *MockLNClient_ListOnchainTransactions_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1120,14 +1250,20 @@ type MockLNClient_ListPeers_Call struct {
|
|||
}
|
||||
|
||||
// ListPeers is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - ctx context.Context
|
||||
func (_e *MockLNClient_Expecter) ListPeers(ctx interface{}) *MockLNClient_ListPeers_Call {
|
||||
return &MockLNClient_ListPeers_Call{Call: _e.mock.On("ListPeers", ctx)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_ListPeers_Call) Run(run func(ctx context.Context)) *MockLNClient_ListPeers_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1176,20 +1312,56 @@ type MockLNClient_ListTransactions_Call struct {
|
|||
}
|
||||
|
||||
// ListTransactions is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - from
|
||||
// - until
|
||||
// - limit
|
||||
// - offset
|
||||
// - unpaid
|
||||
// - invoiceType
|
||||
// - ctx context.Context
|
||||
// - from uint64
|
||||
// - until uint64
|
||||
// - limit uint64
|
||||
// - offset uint64
|
||||
// - unpaid bool
|
||||
// - invoiceType string
|
||||
func (_e *MockLNClient_Expecter) ListTransactions(ctx interface{}, from interface{}, until interface{}, limit interface{}, offset interface{}, unpaid interface{}, invoiceType interface{}) *MockLNClient_ListTransactions_Call {
|
||||
return &MockLNClient_ListTransactions_Call{Call: _e.mock.On("ListTransactions", ctx, from, until, limit, offset, unpaid, invoiceType)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_ListTransactions_Call) Run(run func(ctx context.Context, from uint64, until uint64, limit uint64, offset uint64, unpaid bool, invoiceType string)) *MockLNClient_ListTransactions_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(uint64), args[2].(uint64), args[3].(uint64), args[4].(uint64), args[5].(bool), args[6].(string))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 uint64
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(uint64)
|
||||
}
|
||||
var arg2 uint64
|
||||
if args[2] != nil {
|
||||
arg2 = args[2].(uint64)
|
||||
}
|
||||
var arg3 uint64
|
||||
if args[3] != nil {
|
||||
arg3 = args[3].(uint64)
|
||||
}
|
||||
var arg4 uint64
|
||||
if args[4] != nil {
|
||||
arg4 = args[4].(uint64)
|
||||
}
|
||||
var arg5 bool
|
||||
if args[5] != nil {
|
||||
arg5 = args[5].(bool)
|
||||
}
|
||||
var arg6 string
|
||||
if args[6] != nil {
|
||||
arg6 = args[6].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
arg3,
|
||||
arg4,
|
||||
arg5,
|
||||
arg6,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1238,15 +1410,26 @@ type MockLNClient_LookupInvoice_Call struct {
|
|||
}
|
||||
|
||||
// LookupInvoice is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - paymentHash
|
||||
// - ctx context.Context
|
||||
// - paymentHash string
|
||||
func (_e *MockLNClient_Expecter) LookupInvoice(ctx interface{}, paymentHash interface{}) *MockLNClient_LookupInvoice_Call {
|
||||
return &MockLNClient_LookupInvoice_Call{Call: _e.mock.On("LookupInvoice", ctx, paymentHash)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_LookupInvoice_Call) Run(run func(ctx context.Context, paymentHash string)) *MockLNClient_LookupInvoice_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1295,19 +1478,50 @@ type MockLNClient_MakeHoldInvoice_Call struct {
|
|||
}
|
||||
|
||||
// MakeHoldInvoice is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - amount
|
||||
// - description
|
||||
// - descriptionHash
|
||||
// - expiry
|
||||
// - paymentHash
|
||||
// - ctx context.Context
|
||||
// - amount int64
|
||||
// - description string
|
||||
// - descriptionHash string
|
||||
// - expiry int64
|
||||
// - paymentHash string
|
||||
func (_e *MockLNClient_Expecter) MakeHoldInvoice(ctx interface{}, amount interface{}, description interface{}, descriptionHash interface{}, expiry interface{}, paymentHash interface{}) *MockLNClient_MakeHoldInvoice_Call {
|
||||
return &MockLNClient_MakeHoldInvoice_Call{Call: _e.mock.On("MakeHoldInvoice", ctx, amount, description, descriptionHash, expiry, paymentHash)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_MakeHoldInvoice_Call) Run(run func(ctx context.Context, amount int64, description string, descriptionHash string, expiry int64, paymentHash string)) *MockLNClient_MakeHoldInvoice_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(int64), args[2].(string), args[3].(string), args[4].(int64), args[5].(string))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 int64
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(int64)
|
||||
}
|
||||
var arg2 string
|
||||
if args[2] != nil {
|
||||
arg2 = args[2].(string)
|
||||
}
|
||||
var arg3 string
|
||||
if args[3] != nil {
|
||||
arg3 = args[3].(string)
|
||||
}
|
||||
var arg4 int64
|
||||
if args[4] != nil {
|
||||
arg4 = args[4].(int64)
|
||||
}
|
||||
var arg5 string
|
||||
if args[5] != nil {
|
||||
arg5 = args[5].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
arg3,
|
||||
arg4,
|
||||
arg5,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1356,18 +1570,44 @@ type MockLNClient_MakeInvoice_Call struct {
|
|||
}
|
||||
|
||||
// MakeInvoice is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - amount
|
||||
// - description
|
||||
// - descriptionHash
|
||||
// - expiry
|
||||
// - ctx context.Context
|
||||
// - amount int64
|
||||
// - description string
|
||||
// - descriptionHash string
|
||||
// - expiry int64
|
||||
func (_e *MockLNClient_Expecter) MakeInvoice(ctx interface{}, amount interface{}, description interface{}, descriptionHash interface{}, expiry interface{}) *MockLNClient_MakeInvoice_Call {
|
||||
return &MockLNClient_MakeInvoice_Call{Call: _e.mock.On("MakeInvoice", ctx, amount, description, descriptionHash, expiry)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_MakeInvoice_Call) Run(run func(ctx context.Context, amount int64, description string, descriptionHash string, expiry int64)) *MockLNClient_MakeInvoice_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(int64), args[2].(string), args[3].(string), args[4].(int64))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 int64
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(int64)
|
||||
}
|
||||
var arg2 string
|
||||
if args[2] != nil {
|
||||
arg2 = args[2].(string)
|
||||
}
|
||||
var arg3 string
|
||||
if args[3] != nil {
|
||||
arg3 = args[3].(string)
|
||||
}
|
||||
var arg4 int64
|
||||
if args[4] != nil {
|
||||
arg4 = args[4].(int64)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
arg3,
|
||||
arg4,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1416,15 +1656,26 @@ type MockLNClient_OpenChannel_Call struct {
|
|||
}
|
||||
|
||||
// OpenChannel is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - openChannelRequest
|
||||
// - ctx context.Context
|
||||
// - openChannelRequest *lnclient.OpenChannelRequest
|
||||
func (_e *MockLNClient_Expecter) OpenChannel(ctx interface{}, openChannelRequest interface{}) *MockLNClient_OpenChannel_Call {
|
||||
return &MockLNClient_OpenChannel_Call{Call: _e.mock.On("OpenChannel", ctx, openChannelRequest)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_OpenChannel_Call) Run(run func(ctx context.Context, openChannelRequest *lnclient.OpenChannelRequest)) *MockLNClient_OpenChannel_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*lnclient.OpenChannelRequest))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 *lnclient.OpenChannelRequest
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*lnclient.OpenChannelRequest)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1440,8 +1691,8 @@ func (_c *MockLNClient_OpenChannel_Call) RunAndReturn(run func(ctx context.Conte
|
|||
}
|
||||
|
||||
// RedeemOnchainFunds provides a mock function for the type MockLNClient
|
||||
func (_mock *MockLNClient) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, sendAll bool) (string, error) {
|
||||
ret := _mock.Called(ctx, toAddress, amount, sendAll)
|
||||
func (_mock *MockLNClient) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, feeRate *uint64, sendAll bool) (string, error) {
|
||||
ret := _mock.Called(ctx, toAddress, amount, feeRate, sendAll)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RedeemOnchainFunds")
|
||||
|
|
@ -1449,16 +1700,16 @@ func (_mock *MockLNClient) RedeemOnchainFunds(ctx context.Context, toAddress str
|
|||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, string, uint64, bool) (string, error)); ok {
|
||||
return returnFunc(ctx, toAddress, amount, sendAll)
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, string, uint64, *uint64, bool) (string, error)); ok {
|
||||
return returnFunc(ctx, toAddress, amount, feeRate, sendAll)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, string, uint64, bool) string); ok {
|
||||
r0 = returnFunc(ctx, toAddress, amount, sendAll)
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, string, uint64, *uint64, bool) string); ok {
|
||||
r0 = returnFunc(ctx, toAddress, amount, feeRate, sendAll)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(context.Context, string, uint64, bool) error); ok {
|
||||
r1 = returnFunc(ctx, toAddress, amount, sendAll)
|
||||
if returnFunc, ok := ret.Get(1).(func(context.Context, string, uint64, *uint64, bool) error); ok {
|
||||
r1 = returnFunc(ctx, toAddress, amount, feeRate, sendAll)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
|
@ -1471,17 +1722,44 @@ type MockLNClient_RedeemOnchainFunds_Call struct {
|
|||
}
|
||||
|
||||
// RedeemOnchainFunds is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - toAddress
|
||||
// - amount
|
||||
// - sendAll
|
||||
func (_e *MockLNClient_Expecter) RedeemOnchainFunds(ctx interface{}, toAddress interface{}, amount interface{}, sendAll interface{}) *MockLNClient_RedeemOnchainFunds_Call {
|
||||
return &MockLNClient_RedeemOnchainFunds_Call{Call: _e.mock.On("RedeemOnchainFunds", ctx, toAddress, amount, sendAll)}
|
||||
// - ctx context.Context
|
||||
// - toAddress string
|
||||
// - amount uint64
|
||||
// - feeRate *uint64
|
||||
// - sendAll bool
|
||||
func (_e *MockLNClient_Expecter) RedeemOnchainFunds(ctx interface{}, toAddress interface{}, amount interface{}, feeRate interface{}, sendAll interface{}) *MockLNClient_RedeemOnchainFunds_Call {
|
||||
return &MockLNClient_RedeemOnchainFunds_Call{Call: _e.mock.On("RedeemOnchainFunds", ctx, toAddress, amount, feeRate, sendAll)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_RedeemOnchainFunds_Call) Run(run func(ctx context.Context, toAddress string, amount uint64, sendAll bool)) *MockLNClient_RedeemOnchainFunds_Call {
|
||||
func (_c *MockLNClient_RedeemOnchainFunds_Call) Run(run func(ctx context.Context, toAddress string, amount uint64, feeRate *uint64, sendAll bool)) *MockLNClient_RedeemOnchainFunds_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(bool))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
var arg2 uint64
|
||||
if args[2] != nil {
|
||||
arg2 = args[2].(uint64)
|
||||
}
|
||||
var arg3 *uint64
|
||||
if args[3] != nil {
|
||||
arg3 = args[3].(*uint64)
|
||||
}
|
||||
var arg4 bool
|
||||
if args[4] != nil {
|
||||
arg4 = args[4].(bool)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
arg3,
|
||||
arg4,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1491,7 +1769,7 @@ func (_c *MockLNClient_RedeemOnchainFunds_Call) Return(txId string, err error) *
|
|||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_RedeemOnchainFunds_Call) RunAndReturn(run func(ctx context.Context, toAddress string, amount uint64, sendAll bool) (string, error)) *MockLNClient_RedeemOnchainFunds_Call {
|
||||
func (_c *MockLNClient_RedeemOnchainFunds_Call) RunAndReturn(run func(ctx context.Context, toAddress string, amount uint64, feeRate *uint64, sendAll bool) (string, error)) *MockLNClient_RedeemOnchainFunds_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1519,14 +1797,20 @@ type MockLNClient_ResetRouter_Call struct {
|
|||
}
|
||||
|
||||
// ResetRouter is a helper method to define mock.On call
|
||||
// - key
|
||||
// - key string
|
||||
func (_e *MockLNClient_Expecter) ResetRouter(key interface{}) *MockLNClient_ResetRouter_Call {
|
||||
return &MockLNClient_ResetRouter_Call{Call: _e.mock.On("ResetRouter", key)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_ResetRouter_Call) Run(run func(key string)) *MockLNClient_ResetRouter_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string))
|
||||
var arg0 string
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1575,18 +1859,44 @@ type MockLNClient_SendKeysend_Call struct {
|
|||
}
|
||||
|
||||
// SendKeysend is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - amount
|
||||
// - destination
|
||||
// - customRecords
|
||||
// - preimage
|
||||
// - ctx context.Context
|
||||
// - amount uint64
|
||||
// - destination string
|
||||
// - customRecords []lnclient.TLVRecord
|
||||
// - preimage string
|
||||
func (_e *MockLNClient_Expecter) SendKeysend(ctx interface{}, amount interface{}, destination interface{}, customRecords interface{}, preimage interface{}) *MockLNClient_SendKeysend_Call {
|
||||
return &MockLNClient_SendKeysend_Call{Call: _e.mock.On("SendKeysend", ctx, amount, destination, customRecords, preimage)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_SendKeysend_Call) Run(run func(ctx context.Context, amount uint64, destination string, customRecords []lnclient.TLVRecord, preimage string)) *MockLNClient_SendKeysend_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(uint64), args[2].(string), args[3].([]lnclient.TLVRecord), args[4].(string))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 uint64
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(uint64)
|
||||
}
|
||||
var arg2 string
|
||||
if args[2] != nil {
|
||||
arg2 = args[2].(string)
|
||||
}
|
||||
var arg3 []lnclient.TLVRecord
|
||||
if args[3] != nil {
|
||||
arg3 = args[3].([]lnclient.TLVRecord)
|
||||
}
|
||||
var arg4 string
|
||||
if args[4] != nil {
|
||||
arg4 = args[4].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
arg3,
|
||||
arg4,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1624,15 +1934,26 @@ type MockLNClient_SendPaymentProbes_Call struct {
|
|||
}
|
||||
|
||||
// SendPaymentProbes is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - invoice
|
||||
// - ctx context.Context
|
||||
// - invoice string
|
||||
func (_e *MockLNClient_Expecter) SendPaymentProbes(ctx interface{}, invoice interface{}) *MockLNClient_SendPaymentProbes_Call {
|
||||
return &MockLNClient_SendPaymentProbes_Call{Call: _e.mock.On("SendPaymentProbes", ctx, invoice)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_SendPaymentProbes_Call) Run(run func(ctx context.Context, invoice string)) *MockLNClient_SendPaymentProbes_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1681,17 +2002,38 @@ type MockLNClient_SendPaymentSync_Call struct {
|
|||
}
|
||||
|
||||
// SendPaymentSync is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - payReq
|
||||
// - amount
|
||||
// - timeoutSeconds
|
||||
// - ctx context.Context
|
||||
// - payReq string
|
||||
// - amount *uint64
|
||||
// - timeoutSeconds *int64
|
||||
func (_e *MockLNClient_Expecter) SendPaymentSync(ctx interface{}, payReq interface{}, amount interface{}, timeoutSeconds interface{}) *MockLNClient_SendPaymentSync_Call {
|
||||
return &MockLNClient_SendPaymentSync_Call{Call: _e.mock.On("SendPaymentSync", ctx, payReq, amount, timeoutSeconds)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_SendPaymentSync_Call) Run(run func(ctx context.Context, payReq string, amount *uint64, timeoutSeconds *int64)) *MockLNClient_SendPaymentSync_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string), args[2].(*uint64), args[3].(*int64))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
var arg2 *uint64
|
||||
if args[2] != nil {
|
||||
arg2 = args[2].(*uint64)
|
||||
}
|
||||
var arg3 *int64
|
||||
if args[3] != nil {
|
||||
arg3 = args[3].(*int64)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
arg3,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1729,16 +2071,32 @@ type MockLNClient_SendSpontaneousPaymentProbes_Call struct {
|
|||
}
|
||||
|
||||
// SendSpontaneousPaymentProbes is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - amountMsat
|
||||
// - nodeId
|
||||
// - ctx context.Context
|
||||
// - amountMsat uint64
|
||||
// - nodeId string
|
||||
func (_e *MockLNClient_Expecter) SendSpontaneousPaymentProbes(ctx interface{}, amountMsat interface{}, nodeId interface{}) *MockLNClient_SendSpontaneousPaymentProbes_Call {
|
||||
return &MockLNClient_SendSpontaneousPaymentProbes_Call{Call: _e.mock.On("SendSpontaneousPaymentProbes", ctx, amountMsat, nodeId)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_SendSpontaneousPaymentProbes_Call) Run(run func(ctx context.Context, amountMsat uint64, nodeId string)) *MockLNClient_SendSpontaneousPaymentProbes_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(uint64), args[2].(string))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 uint64
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(uint64)
|
||||
}
|
||||
var arg2 string
|
||||
if args[2] != nil {
|
||||
arg2 = args[2].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1776,15 +2134,26 @@ type MockLNClient_SettleHoldInvoice_Call struct {
|
|||
}
|
||||
|
||||
// SettleHoldInvoice is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - preimage
|
||||
// - ctx context.Context
|
||||
// - preimage string
|
||||
func (_e *MockLNClient_Expecter) SettleHoldInvoice(ctx interface{}, preimage interface{}) *MockLNClient_SettleHoldInvoice_Call {
|
||||
return &MockLNClient_SettleHoldInvoice_Call{Call: _e.mock.On("SettleHoldInvoice", ctx, preimage)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_SettleHoldInvoice_Call) Run(run func(ctx context.Context, preimage string)) *MockLNClient_SettleHoldInvoice_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1875,15 +2244,26 @@ type MockLNClient_SignMessage_Call struct {
|
|||
}
|
||||
|
||||
// SignMessage is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - message
|
||||
// - ctx context.Context
|
||||
// - message string
|
||||
func (_e *MockLNClient_Expecter) SignMessage(ctx interface{}, message interface{}) *MockLNClient_SignMessage_Call {
|
||||
return &MockLNClient_SignMessage_Call{Call: _e.mock.On("SignMessage", ctx, message)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_SignMessage_Call) Run(run func(ctx context.Context, message string)) *MockLNClient_SignMessage_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
@ -1921,15 +2301,26 @@ type MockLNClient_UpdateChannel_Call struct {
|
|||
}
|
||||
|
||||
// UpdateChannel is a helper method to define mock.On call
|
||||
// - ctx
|
||||
// - updateChannelRequest
|
||||
// - ctx context.Context
|
||||
// - updateChannelRequest *lnclient.UpdateChannelRequest
|
||||
func (_e *MockLNClient_Expecter) UpdateChannel(ctx interface{}, updateChannelRequest interface{}) *MockLNClient_UpdateChannel_Call {
|
||||
return &MockLNClient_UpdateChannel_Call{Call: _e.mock.On("UpdateChannel", ctx, updateChannelRequest)}
|
||||
}
|
||||
|
||||
func (_c *MockLNClient_UpdateChannel_Call) Run(run func(ctx context.Context, updateChannelRequest *lnclient.UpdateChannelRequest)) *MockLNClient_UpdateChannel_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*lnclient.UpdateChannelRequest))
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 *lnclient.UpdateChannelRequest
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*lnclient.UpdateChannelRequest)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
|
|||
|
|
@ -555,14 +555,20 @@ type MockService_StartApp_Call struct {
|
|||
}
|
||||
|
||||
// StartApp is a helper method to define mock.On call
|
||||
// - encryptionKey
|
||||
// - encryptionKey string
|
||||
func (_e *MockService_Expecter) StartApp(encryptionKey interface{}) *MockService_StartApp_Call {
|
||||
return &MockService_StartApp_Call{Call: _e.mock.On("StartApp", encryptionKey)}
|
||||
}
|
||||
|
||||
func (_c *MockService_StartApp_Call) Run(run func(encryptionKey string)) *MockService_StartApp_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string))
|
||||
var arg0 string
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ func (app *WailsApp) WailsRequestRouter(route string, method string, body string
|
|||
return WailsRequestRouterResponse{Body: nil, Error: err.Error()}
|
||||
}
|
||||
|
||||
redeemOnchainFundsResponse, err := app.api.RedeemOnchainFunds(ctx, redeemOnchainFundsRequest.ToAddress, redeemOnchainFundsRequest.Amount, redeemOnchainFundsRequest.SendAll)
|
||||
redeemOnchainFundsResponse, err := app.api.RedeemOnchainFunds(ctx, redeemOnchainFundsRequest.ToAddress, redeemOnchainFundsRequest.Amount, redeemOnchainFundsRequest.FeeRate, redeemOnchainFundsRequest.SendAll)
|
||||
if err != nil {
|
||||
return WailsRequestRouterResponse{Body: nil, Error: err.Error()}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue