Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ func NewRootCommand(ctx context.Context, printer output.Printer, application *ap
newShellCommand(printer, application),
newSwitchCommand(printer, application),
newTradingCommand(printer, application),
newTransfersCommand(printer, application),
newTransactionsCommand(printer, application),
newWaitCommand(printer, application),
newWalletsCommand(printer, application),
newWhoAmICommand(printer, application),
newVersionCommand(printer, application),
newWithdrawalsCommand(printer, application),
Expand Down
51 changes: 0 additions & 51 deletions internal/cli/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,27 +271,6 @@ func TestBalanceByCurrency(t *testing.T) {
}
}

func TestWalletsList(t *testing.T) {
application := newTestApp(t)
stdout := &bytes.Buffer{}
stderr := &bytes.Buffer{}
printer := output.New(stdout, stderr)
ctx := context.Background()

if err := runWithPrinter(ctx, printer, application, []string{"login", "--client-id", "client_test_1234", "--secret-key", "secret_test_12345678"}); err != nil {
t.Fatalf("login returned error: %v", err)
}

stdout.Reset()
if err := runWithPrinter(ctx, printer, application, []string{"wallets"}); err != nil {
t.Fatalf("wallets returned error: %v", err)
}

if got := stdout.String(); !strings.Contains(got, `"accounts"`) {
t.Fatalf("unexpected wallets output: %q", got)
}
}

func TestLightningInvoiceCreate(t *testing.T) {
application := newTestApp(t)
stdout := &bytes.Buffer{}
Expand Down Expand Up @@ -687,36 +666,6 @@ func TestTradingPrices(t *testing.T) {
}
}

func TestTransfersCreate(t *testing.T) {
application := newTestApp(t)
stdout := &bytes.Buffer{}
stderr := &bytes.Buffer{}
printer := output.New(stdout, stderr)
ctx := context.Background()

if err := runWithPrinter(ctx, printer, application, []string{"login", "--client-id", "client_test_1234", "--secret-key", "secret_test_12345678"}); err != nil {
t.Fatalf("login returned error: %v", err)
}

stdout.Reset()
err := runWithPrinter(ctx, printer, application, []string{
"transfers", "create",
"--to-address", "0xdaBe4B0Ca57dfBF13763D5f190A2d30B94f1Bf59",
"--amount", "2000000",
"--currency", "USDT",
"--chain", "bsc",
"--reference", "testing_bsc_013",
"--description", "Testing on USDT to binance",
})
if err != nil {
t.Fatalf("transfers create returned error: %v", err)
}

if got := stdout.String(); !strings.Contains(got, `"transaction_id": "transfer_123"`) {
t.Fatalf("unexpected transfers create output: %q", got)
}
}

func TestWaitCardActive(t *testing.T) {
application := newTestApp(t)
stdout := &bytes.Buffer{}
Expand Down
Loading