Skip to content

Commit a61f903

Browse files
committed
test-send: pass memo
1 parent 8c0dd78 commit a61f903

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.github/scripts/wallet/test-send.sh

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,41 @@ AMOUNT="1"
3535
# 1000000 nanomina = 0.001 MINA (small but acceptable fee)
3636
FEE="1000000"
3737

38+
# Optional memo from environment variable (empty by default)
39+
MEMO="${MINA_E2E_TEST_MEMO:-}"
40+
3841
echo "Test: Send transaction to same account (e2e test)"
3942
echo "Key file: $KEY_FILE"
4043
echo "Receiver: $RECEIVER"
4144
echo "Amount: $AMOUNT nanomina"
4245
echo "Fee: $FEE nanomina"
4346
echo "Node endpoint: $NODE_ENDPOINT"
47+
if [ -n "$MEMO" ]; then
48+
echo "Memo: $MEMO"
49+
fi
4450
echo ""
4551

4652
# Export password for the CLI
4753
export MINA_PRIVKEY_PASS="$PASSWORD"
4854

55+
# Build send command arguments
56+
SEND_ARGS=(
57+
--from "$KEY_FILE"
58+
--to "$RECEIVER"
59+
--amount "$AMOUNT"
60+
--fee "$FEE"
61+
--node "$NODE_ENDPOINT"
62+
--network devnet
63+
)
64+
65+
# Add memo if running in CI
66+
if [ -n "$MEMO" ]; then
67+
SEND_ARGS+=(--memo "$MEMO")
68+
fi
69+
4970
# Run the wallet send command
5071
echo "Sending transaction..."
51-
SEND_OUTPUT=$(./target/release/mina wallet send \
52-
--from "$KEY_FILE" \
53-
--to "$RECEIVER" \
54-
--amount "$AMOUNT" \
55-
--fee "$FEE" \
56-
--node "$NODE_ENDPOINT" \
57-
--network devnet 2>&1 || true)
72+
SEND_OUTPUT=$(./target/release/mina wallet send "${SEND_ARGS[@]}" 2>&1 || true)
5873

5974
echo "Send command output:"
6075
echo "$SEND_OUTPUT"

.github/workflows/tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ jobs:
265265
env:
266266
MINA_PRIVKEY_PASS: ${{ secrets.MINA_PRIVKEY_PASS }}
267267
MINA_NODE_ENDPOINT: http://mina-rust-plain-1.gcp.o1test.net/graphql
268+
MINA_E2E_TEST_MEMO: MINA_RUST PR#${{ github.event.pull_request.number }}
268269
run: make test-wallet
269270

270271
build-tests:

0 commit comments

Comments
 (0)