File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/agent-sdk/src/evm Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export async function validateRequest<
82
82
return null ;
83
83
}
84
84
85
- async function getAdapterAddress (
85
+ export async function getAdapterAddress (
86
86
accountId : string ,
87
87
safeSaltNonce : string ,
88
88
) : Promise < Address > {
Original file line number Diff line number Diff line change @@ -35,15 +35,15 @@ export async function getTokenDetails(
35
35
symbolOrAddress : string ,
36
36
tokenMap ?: BlockchainMapping ,
37
37
) : Promise < TokenInfo > {
38
+ if ( isAddress ( symbolOrAddress , { strict : false } ) ) {
39
+ return getTokenInfo ( chainId , symbolOrAddress ) ;
40
+ }
38
41
if ( ! tokenMap ) {
39
42
console . log (
40
43
"Loading TokenMap... this should be stored in memory consider setting it with loadTokenMap() in your app and passing it here." ,
41
44
) ;
42
45
tokenMap = await loadTokenMap ( ) ;
43
46
}
44
- if ( isAddress ( symbolOrAddress , { strict : false } ) ) {
45
- return getTokenInfo ( chainId , symbolOrAddress ) ;
46
- }
47
47
console . log ( "Seeking TokenMap for Symbol" , symbolOrAddress ) ;
48
48
// TokenMap has lower cased (sanitized) symbols
49
49
return tokenMap [ chainId ] [ symbolOrAddress . toLowerCase ( ) ] ;
You can’t perform that action at this time.
0 commit comments