@@ -13,7 +13,7 @@ use subxt::{
13
13
crypto:: { CryptoTypePublicPair , Derive , UncheckedFrom } ,
14
14
ecdsa, ByteArray , DeriveJunction , Pair as TraitPair , Public as TraitPublic ,
15
15
} ,
16
- sp_runtime:: { CryptoType , MultiSignature , MultiSigner } ,
16
+ sp_runtime:: { CryptoType , MultiSignature } ,
17
17
} ,
18
18
} ;
19
19
use tokio:: time:: sleep;
@@ -165,20 +165,20 @@ impl ByteArray for Public {
165
165
}
166
166
167
167
impl std:: fmt:: Display for Public {
168
- fn fmt ( & self , _f : & mut std:: fmt:: Formatter ) -> std:: fmt:: Result {
169
- todo ! ( )
168
+ fn fmt ( & self , f : & mut std:: fmt:: Formatter ) -> std:: fmt:: Result {
169
+ write ! ( f , "{}" , hex :: encode ( self . as_ref ( ) ) )
170
170
}
171
171
}
172
172
173
173
impl AsRef < [ u8 ] > for Public {
174
174
fn as_ref ( & self ) -> & [ u8 ] {
175
- todo ! ( )
175
+ & self . 0 [ .. ]
176
176
}
177
177
}
178
178
179
179
impl AsMut < [ u8 ] > for Public {
180
180
fn as_mut ( & mut self ) -> & mut [ u8 ] {
181
- todo ! ( )
181
+ & mut self . 0 [ .. ]
182
182
}
183
183
}
184
184
@@ -206,13 +206,7 @@ impl TryFrom<&[u8]> for Public {
206
206
207
207
impl TraitPublic for Public {
208
208
fn to_public_crypto_pair ( & self ) -> CryptoTypePublicPair {
209
- todo ! ( )
210
- }
211
- }
212
-
213
- impl From < Public > for MultiSigner {
214
- fn from ( _x : Public ) -> Self {
215
- todo ! ( )
209
+ CryptoTypePublicPair ( ecdsa:: CRYPTO_ID , self . as_ref ( ) . to_vec ( ) )
216
210
}
217
211
}
218
212
0 commit comments