Commit 23c7b8c Aton
authored
1 parent fbe80fc commit 23c7b8c Copy full SHA for 23c7b8c
File tree 2 files changed +1
-25
lines changed
2 files changed +1
-25
lines changed Original file line number Diff line number Diff line change 52
52
. into_iter ( )
53
53
. map ( |( token, map) | AssetInfo {
54
54
name : String :: from_utf8_lossy ( & token) . into_owned ( ) ,
55
- is_native : true ,
56
55
details : map,
57
56
} )
58
57
. collect ( ) ;
92
91
let free_issue = total_issue - other_total;
93
92
bmap. insert ( xassets:: AssetType :: Free , free_issue) ;
94
93
}
95
- let mut trustee_addr = String :: default ( ) ;
96
- if asset. token ( ) . as_slice ( ) == xbitcoin:: Module :: < Runtime > :: TOKEN {
97
- let key = <xaccounts:: TrusteeAddress < Runtime > >:: key_for ( xassets:: Chain :: Bitcoin ) ;
98
- match Self :: pickout :: < xaccounts:: TrusteeAddressPair > ( & state, & key) ? {
99
- Some ( a) => {
100
- let hot_address =
101
- Address :: from_layout ( & a. hot_address . as_slice ( ) ) . unwrap_or_default ( ) ;
102
- trustee_addr = hot_address. to_string ( )
103
- }
104
- None => Default :: default ( ) ,
105
- } ;
106
- }
107
94
108
- all_assets. push ( TotalAssetInfo :: new (
109
- asset,
110
- valid,
111
- trustee_addr,
112
- CodecBTreeMap ( bmap) ,
113
- ) ) ;
95
+ all_assets. push ( TotalAssetInfo :: new ( asset, valid, CodecBTreeMap ( bmap) ) ) ;
114
96
}
115
97
116
98
into_pagedata ( all_assets, page_index, page_size)
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ pub struct PageData<T> {
14
14
#[ serde( rename_all = "camelCase" ) ]
15
15
pub struct AssetInfo {
16
16
pub name : String ,
17
- pub is_native : bool ,
18
17
pub details : CodecBTreeMap < AssetType , Balance > ,
19
18
}
20
19
@@ -23,12 +22,10 @@ pub struct AssetInfo {
23
22
pub struct TotalAssetInfo {
24
23
name : String ,
25
24
token_name : String ,
26
- is_native : bool ,
27
25
chain : Chain ,
28
26
precision : u16 ,
29
27
desc : String ,
30
28
online : bool ,
31
- trustee_addr : String ,
32
29
details : CodecBTreeMap < AssetType , Balance > ,
33
30
}
34
31
@@ -52,18 +49,15 @@ impl TotalAssetInfo {
52
49
pub fn new (
53
50
asset : Asset ,
54
51
online : bool ,
55
- trustee : String ,
56
52
details : CodecBTreeMap < AssetType , Balance > ,
57
53
) -> TotalAssetInfo {
58
54
TotalAssetInfo {
59
55
name : String :: from_utf8_lossy ( & asset. token ( ) ) . into_owned ( ) ,
60
56
token_name : String :: from_utf8_lossy ( & asset. token_name ( ) ) . into_owned ( ) ,
61
- is_native : asset. chain ( ) == Chain :: ChainX ,
62
57
chain : asset. chain ( ) ,
63
58
precision : asset. precision ( ) ,
64
59
desc : String :: from_utf8_lossy ( & asset. desc ( ) ) . into_owned ( ) ,
65
60
online,
66
- trustee_addr : trustee,
67
61
details,
68
62
}
69
63
}
You can’t perform that action at this time.
0 commit comments