File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
solana/programs/example-native-token-transfers/src/transceivers/wormhole Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,16 @@ use anchor_lang::prelude::*;
3
3
use wormhole_anchor_sdk:: wormhole;
4
4
use wormhole_io:: TypePrefixedPayload ;
5
5
6
+ cfg_if:: cfg_if! {
7
+ if #[ cfg( feature = "tilt-devnet2" ) ] {
8
+ const FINALITY : wormhole:: Finality = wormhole:: Finality :: Confirmed ;
9
+ } else if #[ cfg( feature = "tilt-devnet" ) ] {
10
+ const FINALITY : wormhole:: Finality = wormhole:: Finality :: Confirmed ;
11
+ } else {
12
+ const FINALITY : wormhole:: Finality = wormhole:: Finality :: Finalized ;
13
+ }
14
+ }
15
+
6
16
// TODO: should we add emitter in here too?
7
17
#[ derive( Accounts ) ]
8
18
pub struct WormholeAccounts < ' info > {
@@ -62,7 +72,7 @@ pub fn post_message<'info, A: TypePrefixedPayload>(
62
72
CpiContext :: new_with_signer ( wormhole. program . to_account_info ( ) , ix, & seeds. concat ( ) ) ,
63
73
batch_id,
64
74
TypePrefixedPayload :: to_vec_payload ( payload) ,
65
- wormhole :: Finality :: Finalized ,
75
+ FINALITY ,
66
76
) ?;
67
77
68
78
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments