From 6fb7749de87ab9c6013ef9982558829992df00a6 Mon Sep 17 00:00:00 2001 From: Amaury <1293565+amaurym@users.noreply.github.com> Date: Thu, 9 Feb 2023 13:57:51 +0100 Subject: [PATCH] chore: Clean-ups after Textual Title/Content PR --- docs/architecture/adr-050-sign-mode-textual.md | 4 ++-- x/tx/textual/encode.go | 2 +- x/tx/textual/internal/testdata/tx.json | 9 ++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/architecture/adr-050-sign-mode-textual.md b/docs/architecture/adr-050-sign-mode-textual.md index 1ac4a90cc36a..176f2a546520 100644 --- a/docs/architecture/adr-050-sign-mode-textual.md +++ b/docs/architecture/adr-050-sign-mode-textual.md @@ -129,8 +129,8 @@ The SignDoc for `SIGN_MODE_TEXTUAL` is formed from a data structure like: ```go type Screen struct { - Title string // possibly size limited to, e.g. 64 characters - Content string // possibly size limited to, e.g. 255 characters + Title string // possibly size limited to, advised to 64 characters + Content string // possibly size limited to, advised to 255 characters Indent uint8 // size limited to something small like 16 or 32 Expert bool } diff --git a/x/tx/textual/encode.go b/x/tx/textual/encode.go index 214f5fc18d69..2181b3a5f69f 100644 --- a/x/tx/textual/encode.go +++ b/x/tx/textual/encode.go @@ -22,7 +22,7 @@ var ( // ? indent_key: uint, // ? expert_key: bool, // } -// text_key = 1 +// title_key = 1 // content_key = 2 // indent_key = 3 // expert_key = 4 diff --git a/x/tx/textual/internal/testdata/tx.json b/x/tx/textual/internal/testdata/tx.json index af331e2c74d5..eac7734343a8 100644 --- a/x/tx/textual/internal/testdata/tx.json +++ b/x/tx/textual/internal/testdata/tx.json @@ -71,7 +71,14 @@ "name": "tricky memo (starts with >, utf-8, trailing whitespaces)", "proto": { "body": { - "messages": [{ "@type": "/cosmos.bank.v1beta1.MsgSend", "from_address": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", "to_address": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t", "amount": [{ "denom": "uatom", "amount": "10000000" }] }], + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", + "to_address": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t", + "amount": [{ "denom": "uatom", "amount": "10000000" }] + } + ], "memo": "> ⚛️\\u269B⚛️ " }, "auth_info": {