Dynamic amount in unroll closure (#173)

* update UnrollClosure

* update TrustedOnboarding flow + add TrustedOnboarding e2e test

* fix linter: grpc.Dial

* add comment

* integration tests: faucet the ASP with 2 utxos
This commit is contained in:
Louis Singer
2024-05-28 12:13:03 +02:00
committed by GitHub
parent 2dae630daf
commit dca302df69
18 changed files with 523 additions and 723 deletions

View File

@@ -55,19 +55,13 @@ func (h *handler) TrustedOnboarding(ctx context.Context, req *arkv1.TrustedOnboa
return nil, status.Error(codes.InvalidArgument, "invalid user pubkey")
}
amount := req.GetAmount()
if amount <= 0 {
return nil, status.Error(codes.InvalidArgument, "invalid amount")
}
address, expectedAmount, err := h.svc.TrustedOnboarding(ctx, decodedPubKey, amount)
address, err := h.svc.TrustedOnboarding(ctx, decodedPubKey)
if err != nil {
return nil, err
}
return &arkv1.TrustedOnboardingResponse{
Address: address,
ExpectedAmount: expectedAmount,
Address: address,
}, nil
}