File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 44cli /.env_prod
55
66solana /staking /script /.env_dev
7+
8+ cli /.env_dev
Original file line number Diff line number Diff line change @@ -130,6 +130,20 @@ pub async fn submit_signature(
130130 return HttpResponse :: Ok ( ) . body ( serde_json:: to_string ( & ret) . unwrap ( ) ) ;
131131 }
132132
133+ let dropped_entity = dropped_data. iter ( ) . find ( |x| x. solana_address == post_params. message ) ;
134+ if dropped_entity. is_some ( ) && ( dropped_entity. unwrap ( ) . success || dropped_entity. unwrap ( ) . signature . is_some ( ) ) {
135+ let error = format ! ( "This solana wallet already linked to this address: {}. Please use another solana wallet" , dropped_entity. unwrap( ) . address) ;
136+ println ! ( "{}" , error. clone( ) ) ;
137+ let ret = VestingResp {
138+ is_success : false ,
139+ error_message : Some ( error) ,
140+ page_index : Some ( 1 ) ,
141+ amount_locked : amount_locked,
142+ amount_unlocked : amount_unlocked,
143+ } ;
144+ return HttpResponse :: Ok ( ) . body ( serde_json:: to_string ( & ret) . unwrap ( ) ) ;
145+ }
146+
133147 if post_params. network == 0 {
134148 let address_str: H160 = post_params. pubkey . parse ( ) . unwrap ( ) ;
135149 let signed_message = get_signed_message ( post_params. message . clone ( ) ) ;
You can’t perform that action at this time.
0 commit comments