Fix btc wallet restore (covenantless asp) (#332)

* first account = default btcwallet account (account index 0)

* Update server/internal/infrastructure/wallet/btc-embedded/wallet.go

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com>

* fix restoration

* increase arkd timeout

* fix connector signature

---------

Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com>
Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
This commit is contained in:
Louis Singer
2024-09-27 17:47:42 +02:00
committed by GitHub
parent ab6ae36eb5
commit 72e31d839a
4 changed files with 121 additions and 102 deletions

View File

@@ -77,6 +77,8 @@ var (
}
)
var timeout = time.Minute
func walletStatusAction(ctx *cli.Context) error {
baseURL := ctx.String("url")
tlsCertPath := ctx.String("tls-cert-path")
@@ -220,7 +222,7 @@ func post[T any](url, body, key, macaroon, tlsCert string) (result T, err error)
req.Header.Add("X-Macaroon", macaroon)
}
client := &http.Client{
Timeout: 30 * time.Second,
Timeout: timeout,
Transport: &http.Transport{
TLSClientConfig: tlsConfig,
},
@@ -267,7 +269,7 @@ func get[T any](url, key, macaroon, tlsCert string) (result T, err error) {
}
client := &http.Client{
Timeout: 30 * time.Second,
Timeout: timeout,
Transport: &http.Transport{
TLSClientConfig: tlsConfig,
},
@@ -331,7 +333,7 @@ func getBalance(url, macaroon, tlsCert string) (*balance, error) {
req.Header.Add("X-Macaroon", macaroon)
}
client := &http.Client{
Timeout: 30 * time.Second,
Timeout: timeout,
Transport: &http.Transport{
TLSClientConfig: tlsConfig,
},
@@ -384,7 +386,7 @@ func getStatus(url, tlsCert string) (*status, error) {
req.Header.Add("Content-Type", "application/json")
client := &http.Client{
Timeout: 30 * time.Second,
Timeout: timeout,
Transport: &http.Transport{
TLSClientConfig: tlsConfig,
},