@@ -95,40 +95,48 @@ pub async fn verify<'a>(
95
95
} ) => {
96
96
validate_address_shelley_stake ( keypath, Some ( bip44_account) ) ?;
97
97
signing_keypaths. push ( keypath) ;
98
- let drep_type_name = match certificate:: vote_delegation:: CardanoDRepType :: try_from ( * r#type) ? {
99
- certificate:: vote_delegation:: CardanoDRepType :: KeyHash => "Key Hash" ,
100
- certificate:: vote_delegation:: CardanoDRepType :: ScriptHash => "Script Hash" ,
101
- certificate:: vote_delegation:: CardanoDRepType :: AlwaysAbstain => "Always Abstain" ,
102
- certificate:: vote_delegation:: CardanoDRepType :: AlwaysNoConfidence => "Always No Confidence" ,
103
- } ;
98
+ let drep_type_name =
99
+ match certificate:: vote_delegation:: CardanoDRepType :: try_from ( * r#type) ? {
100
+ certificate:: vote_delegation:: CardanoDRepType :: KeyHash => "Key Hash" ,
101
+ certificate:: vote_delegation:: CardanoDRepType :: ScriptHash => "Script Hash" ,
102
+ certificate:: vote_delegation:: CardanoDRepType :: AlwaysAbstain => {
103
+ "Always Abstain"
104
+ }
105
+ certificate:: vote_delegation:: CardanoDRepType :: AlwaysNoConfidence => {
106
+ "Always No Confidence"
107
+ }
108
+ } ;
104
109
match drep_credhash {
105
- Some ( hash) => { confirm:: confirm ( & confirm:: Params {
106
- title : params. name ,
107
- body : & format ! (
108
- "Delegate voting for account #{} to type {} and drep {}?" ,
109
- keypath[ 2 ] + 1 - HARDENED ,
110
- drep_type_name,
111
- hex:: encode( hash) ,
112
- ) ,
113
- scrollable : true ,
114
- accept_is_nextarrow : true ,
115
- ..Default :: default ( )
116
- } )
117
- . await ?; }
118
- None => { confirm:: confirm ( & confirm:: Params {
119
- title : params. name ,
120
- body : & format ! (
121
- "Delegate voting for account #{} to type {}?" ,
122
- keypath[ 2 ] + 1 - HARDENED ,
123
- drep_type_name,
124
- ) ,
125
- scrollable : true ,
126
- accept_is_nextarrow : true ,
127
- ..Default :: default ( )
128
- } )
129
- . await ?; }
110
+ Some ( hash) => {
111
+ confirm:: confirm ( & confirm:: Params {
112
+ title : params. name ,
113
+ body : & format ! (
114
+ "Delegate voting for account #{} to type {} and drep {}?" ,
115
+ keypath[ 2 ] + 1 - HARDENED ,
116
+ drep_type_name,
117
+ hex:: encode( hash) ,
118
+ ) ,
119
+ scrollable : true ,
120
+ accept_is_nextarrow : true ,
121
+ ..Default :: default ( )
122
+ } )
123
+ . await ?;
124
+ }
125
+ None => {
126
+ confirm:: confirm ( & confirm:: Params {
127
+ title : params. name ,
128
+ body : & format ! (
129
+ "Delegate voting for account #{} to type {}?" ,
130
+ keypath[ 2 ] + 1 - HARDENED ,
131
+ drep_type_name,
132
+ ) ,
133
+ scrollable : true ,
134
+ accept_is_nextarrow : true ,
135
+ ..Default :: default ( )
136
+ } )
137
+ . await ?;
138
+ }
130
139
}
131
-
132
140
}
133
141
} ;
134
142
}
0 commit comments