Commit 2c4e106
test(sdk-coin-xlm): add ALPHANUM12 enabletoken verification tests for TUSDC
Add three unit tests exercising the ALPHANUM12 (5-char asset code) path
through verifyTransaction/verifyTrustlineTxOperations in sdk-coin-xlm.
All prior test fixtures only covered ALPHANUM4 (≤4 char) asset codes;
TUSDC is 5 chars and is encoded as assetTypeCreditAlphanum12 in Stellar
XDR, which is a distinct code path that was previously untested.
Tests added:
1. Happy path: changeTrust XDR for stellar.Asset('TUSDC', issuer) is
accepted by verifyTransaction with matching enabletoken txParams.
2. Issuer mismatch: changeTrust from a different issuer is rejected with
the expected "Invalid issuer on token enablement operation" error.
3. Code mismatch: changeTrust for 'USDCX' (also ALPHANUM12) while params
expect 'TUSDC' is rejected with the expected code-mismatch error.
These tests exercise the same issuer identified in CSHLD-1407/CSHLD-1447
(GC26PEYGETD7L6PUW2VCU3PSC7LCLRRPOSUILSHD2RT23IQUEAN4TQBQ) and confirm
the SDK's XLM token verification pipeline handles ALPHANUM12 assets.
Ticket: CSHLD-1447
Session-Id: bb58b0aa-c314-4212-8901-e1cfc7a3c8db
Task-Id: 31db5ad2-ab59-4d9f-8c21-6acc91a05c081 parent 3333cb4 commit 2c4e106
1 file changed
Lines changed: 69 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1016 | 1016 | | |
1017 | 1017 | | |
1018 | 1018 | | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
1019 | 1088 | | |
1020 | 1089 | | |
1021 | 1090 | | |
| |||
0 commit comments