File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @aztec/bridge-clients" ,
3
- "version" : " 0.1.52 " ,
3
+ "version" : " 0.1.53 " ,
4
4
"description" : " This repo contains the solidity files and typescript helper class for all of the Aztec Connect Bridge Contracts" ,
5
5
"repository" :
" [email protected] :AztecProtocol/aztec-connect-bridges.git" ,
6
6
"license" : " Apache-2.0" ,
Original file line number Diff line number Diff line change @@ -78,20 +78,19 @@ export class YearnBridgeData implements BridgeDataFieldGetters {
78
78
}
79
79
}
80
80
81
+ const hasInputAsset = allVaultsForTokens [ inputAssetA . erc20Address . toString ( ) ] || [ ] ;
82
+ const hasOutputAsset = allVaultsForTokens [ outputAssetA . erc20Address . toString ( ) ] || [ ] ;
83
+
81
84
// standard deposit
82
85
const matchDepositSituation =
83
- ( allVaultsForTokens [ inputAssetA . erc20Address . toString ( ) ] || [ ] ) ?. findIndex (
84
- token => token . toString ( ) === outputAssetA . erc20Address . toString ( ) ,
85
- ) > - 1 ;
86
+ hasInputAsset && hasInputAsset . findIndex ( token => token . toString ( ) === outputAssetA . erc20Address . toString ( ) ) > - 1 ;
86
87
if ( matchDepositSituation ) {
87
88
return [ 0 ] ;
88
89
}
89
-
90
90
// standard withdraw
91
91
const matchWithdrawSituation =
92
- ( allVaultsForTokens [ outputAssetA . erc20Address . toString ( ) ] || [ ] ) ?. findIndex (
93
- token => token . toString ( ) === inputAssetA . erc20Address . toString ( ) ,
94
- ) > - 1 ;
92
+ hasOutputAsset &&
93
+ hasOutputAsset . findIndex ( token => token . toString ( ) === inputAssetA . erc20Address . toString ( ) ) > - 1 ;
95
94
if ( matchWithdrawSituation ) {
96
95
return [ 1 ] ;
97
96
}
You can’t perform that action at this time.
0 commit comments