Skip to content

Commit fa964c7

Browse files
overcatibz
authored andcommitted
refactor(core): improve Stellar signing UX
1 parent 7700537 commit fa964c7

File tree

24 files changed

+747
-442
lines changed

24 files changed

+747
-442
lines changed

common/tests/fixtures/stellar/sign_tx.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,79 @@
10021002
"public_key": "2f22b9c62f08b774f3ebe6dd6e7db93c3ec2cbde0279561a3d9c5225b8c32292",
10031003
"signature": "6OL75JoHdYg5eomt6fXmLffqYwix+jwd1RzOq7M2I+/7obUgdtZPYBm5Cjnhov5wAlWPHE2seQ/BuEZMrZUJCA=="
10041004
}
1005+
},
1006+
{
1007+
"name": "all_sending_like_operations",
1008+
"parameters": {
1009+
"xdr": "AAAAAgAAAAAvIrnGLwi3dPPr5t1ufbk8PsLL3gJ5Vho9nFIluMMikgAAAfQAAAAAAAAD6AAAAAEAAAAAG4J3zQAAAABd5CqEAAAAAAAAAAUAAAAAAAAAAAAAAABdVWQkZrGFuEMVLp4hkVHbxYkgJ+xAEBpRe+1coDDC4AAAAAAF9eEAAAAAAAAAAAEAAAAAXVVkJGaxhbhDFS6eIZFR28WJICfsQBAaUXvtXKAwwuAAAAABWAAAAAAAAAAphJYCwg5YNl8SPBLYehykVQ0QzSGwrg4Y1E4+Vv1qFQAAAAAdzxaYAAAAAAAAAA0AAAABWAAAAAAAAABwi6oxX35cFm2EtGS/s4/WJXj+OtJyJ+dsy7ehecRRIQAAAAAdzxaYAAAAAF1VZCRmsYW4QxUuniGRUdvFiSAn7EAQGlF77VygMMLgAAAAAkFCQ0RFRkdISUpLTAAAAAAphJYCwg5YNl8SPBLYehykVQ0QzSGwrg4Y1E4+Vv1qFQAAAAAAAeJAAAAAAAAAAAAAAAACAAAAAVgAAAAAAAAAcIuqMV9+XBZthLRkv7OP1iV4/jrScifnbMu3oXnEUSEAAAAAHc8WmAAAAABdVWQkZrGFuEMVLp4hkVHbxYkgJ+xAEBpRe+1coDDC4AAAAAJBQkNERUZHSElKS0wAAAAAKYSWAsIOWDZfEjwS2HocpFUNEM0hsK4OGNROPlb9ahUAAAAAAAHiQAAAAAAAAAAAAAAACAAAAABdVWQkZrGFuEMVLp4hkVHbxYkgJ+xAEBpRe+1coDDC4AAAAAAAAAAA",
1010+
"address_n": "m/44'/148'/0'",
1011+
"network_passphrase": "Test SDF Network ; September 2015",
1012+
"tx": {
1013+
"source_account": "GAXSFOOGF4ELO5HT5PTN23T5XE6D5QWL3YBHSVQ2HWOFEJNYYMRJENBV",
1014+
"fee": 500,
1015+
"sequence_number": 1000,
1016+
"timebounds_start": 461535181,
1017+
"timebounds_end": 1575234180,
1018+
"memo_type": "NONE"
1019+
},
1020+
"operations": [
1021+
{
1022+
"_message_type": "StellarCreateAccountOp",
1023+
"new_account": "GBOVKZBEM2YYLOCDCUXJ4IMRKHN4LCJAE7WEAEA2KF562XFAGDBOB64V",
1024+
"starting_balance": 100000000
1025+
},
1026+
{
1027+
"_message_type": "StellarPaymentOp",
1028+
"destination_account": "GBOVKZBEM2YYLOCDCUXJ4IMRKHN4LCJAE7WEAEA2KF562XFAGDBOB64V",
1029+
"asset": {
1030+
"type": "ALPHANUM4",
1031+
"code": "X",
1032+
"issuer": "GAUYJFQCYIHFQNS7CI6BFWD2DSSFKDIQZUQ3BLQODDKE4PSW7VVBKENC"
1033+
},
1034+
"amount": 500111000
1035+
},
1036+
{
1037+
"_message_type": "StellarPathPaymentStrictSendOp",
1038+
"send_asset": {
1039+
"type": "ALPHANUM4",
1040+
"code": "X",
1041+
"issuer": "GBYIXKRRL57FYFTNQS2GJP5TR7LCK6H6HLJHEJ7HNTF3PILZYRISDLNQ"
1042+
},
1043+
"send_amount": 500111000,
1044+
"destination_account": "GBOVKZBEM2YYLOCDCUXJ4IMRKHN4LCJAE7WEAEA2KF562XFAGDBOB64V",
1045+
"destination_asset": {
1046+
"type": "ALPHANUM12",
1047+
"code": "ABCDEFGHIJKL",
1048+
"issuer": "GAUYJFQCYIHFQNS7CI6BFWD2DSSFKDIQZUQ3BLQODDKE4PSW7VVBKENC"
1049+
},
1050+
"destination_min": 123456
1051+
},
1052+
{
1053+
"_message_type": "StellarPathPaymentStrictReceiveOp",
1054+
"send_asset": {
1055+
"type": "ALPHANUM4",
1056+
"code": "X",
1057+
"issuer": "GBYIXKRRL57FYFTNQS2GJP5TR7LCK6H6HLJHEJ7HNTF3PILZYRISDLNQ"
1058+
},
1059+
"send_max": 500111000,
1060+
"destination_account": "GBOVKZBEM2YYLOCDCUXJ4IMRKHN4LCJAE7WEAEA2KF562XFAGDBOB64V",
1061+
"destination_asset": {
1062+
"type": "ALPHANUM12",
1063+
"code": "ABCDEFGHIJKL",
1064+
"issuer": "GAUYJFQCYIHFQNS7CI6BFWD2DSSFKDIQZUQ3BLQODDKE4PSW7VVBKENC"
1065+
},
1066+
"destination_amount": 123456
1067+
},
1068+
{
1069+
"_message_type": "StellarAccountMergeOp",
1070+
"destination_account": "GBOVKZBEM2YYLOCDCUXJ4IMRKHN4LCJAE7WEAEA2KF562XFAGDBOB64V"
1071+
}
1072+
]
1073+
},
1074+
"result": {
1075+
"public_key": "2f22b9c62f08b774f3ebe6dd6e7db93c3ec2cbde0279561a3d9c5225b8c32292",
1076+
"signature": "ooAYonekHwUqyAahFkVoHL811S0z22sJ8Wqe277RqBnTillDRtIk3uqi0KsLZYJyeC8Ln7J0ZaXAtGPwIYoKCg=="
1077+
}
10051078
}
10061079
]
10071080
}

core/.changelog.d/5148.changed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improved Stellar transaction signing interface for a more streamlined user experience.

core/embed/rust/librust_qstr.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,9 +1276,7 @@ static void _librust_qstrs(void) {
12761276
MP_QSTR_stellar__clear_flags;
12771277
MP_QSTR_stellar__confirm_issuer;
12781278
MP_QSTR_stellar__confirm_memo;
1279-
MP_QSTR_stellar__confirm_network;
12801279
MP_QSTR_stellar__confirm_operation;
1281-
MP_QSTR_stellar__confirm_stellar;
12821280
MP_QSTR_stellar__confirm_timebounds;
12831281
MP_QSTR_stellar__create_account;
12841282
MP_QSTR_stellar__debited_amount;
@@ -1292,8 +1290,6 @@ static void _librust_qstrs(void) {
12921290
MP_QSTR_stellar__high;
12931291
MP_QSTR_stellar__home_domain;
12941292
MP_QSTR_stellar__inflation;
1295-
MP_QSTR_stellar__initial_balance;
1296-
MP_QSTR_stellar__initialize_signing_with;
12971293
MP_QSTR_stellar__issuer_template;
12981294
MP_QSTR_stellar__key;
12991295
MP_QSTR_stellar__limit;
@@ -1304,14 +1300,12 @@ static void _librust_qstrs(void) {
13041300
MP_QSTR_stellar__new_passive_offer;
13051301
MP_QSTR_stellar__no_memo_set;
13061302
MP_QSTR_stellar__no_restriction;
1307-
MP_QSTR_stellar__on_network_template;
13081303
MP_QSTR_stellar__path_pay;
13091304
MP_QSTR_stellar__path_pay_at_least;
13101305
MP_QSTR_stellar__pay;
13111306
MP_QSTR_stellar__pay_at_most;
13121307
MP_QSTR_stellar__preauth_transaction;
13131308
MP_QSTR_stellar__price_per_template;
1314-
MP_QSTR_stellar__private_network;
13151309
MP_QSTR_stellar__remove_signer;
13161310
MP_QSTR_stellar__revoke_trust;
13171311
MP_QSTR_stellar__selling;
@@ -1320,15 +1314,18 @@ static void _librust_qstrs(void) {
13201314
MP_QSTR_stellar__set_sequence_to_template;
13211315
MP_QSTR_stellar__sign_tx_count_template;
13221316
MP_QSTR_stellar__sign_tx_fee_template;
1317+
MP_QSTR_stellar__sign_with;
13231318
MP_QSTR_stellar__source_account;
1324-
MP_QSTR_stellar__testnet_network;
1319+
MP_QSTR_stellar__timebounds;
1320+
MP_QSTR_stellar__token_info;
1321+
MP_QSTR_stellar__transaction_source;
1322+
MP_QSTR_stellar__transaction_source_diff_warning;
13251323
MP_QSTR_stellar__trusted_account;
13261324
MP_QSTR_stellar__update;
13271325
MP_QSTR_stellar__valid_from;
13281326
MP_QSTR_stellar__valid_to;
13291327
MP_QSTR_stellar__value_sha256;
13301328
MP_QSTR_stellar__wanna_clean_value_key_template;
1331-
MP_QSTR_stellar__your_account;
13321329
MP_QSTR_tezos__baker_address;
13331330
MP_QSTR_tezos__balance;
13341331
MP_QSTR_tezos__ballot;

core/embed/rust/src/translations/generated/translated_string.rs

Lines changed: 31 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)