You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @returns{boolean | undefined} A boolean indicating whether the function is being called to approve or revoke access.
211
+
* @param tokenData - ethers Interface token data.
212
+
* @returns A boolean indicating whether the function is being called to approve or revoke access, or undefined if the '_approved` parameter is not present.
206
213
*/
207
214
exportfunctiongetTokenApprovedParam(
208
215
tokenData: Partial<TransactionDescription>={},
209
216
){
210
-
returntokenData?.args?._approved;
217
+
const{ args ={}}=tokenData;
218
+
if(!('_approved'inargs)){
219
+
returnundefined;
220
+
}
221
+
returnBoolean(args._approved);
211
222
}
212
223
213
224
/**
214
225
* Get the token balance converted to fiat and optionally formatted for display
215
226
*
216
-
* @param{number | string} [contractExchangeRate] - The exchange rate between the current token and the native currency
217
-
* @param{number} conversionRate - The exchange rate between the current fiat currency and the native currency
218
-
* @param{string} currentCurrency - The currency code for the user's chosen fiat currency
219
-
* @param{string} [tokenAmount] - The current token balance
220
-
* @param{string} [tokenSymbol] - The token symbol
221
-
* @param{boolean} [formatted] - Whether the return value should be formatted or not
222
-
* @param{boolean} [hideCurrencySymbol] - excludes the currency symbol in the result if true
223
-
* @returns{string|undefined} The token amount in the user's chosen fiat currency, optionally formatted and localize
227
+
* @param [contractExchangeRate] - The exchange rate between the current token and the native currency
228
+
* @param conversionRate - The exchange rate between the current fiat currency and the native currency
229
+
* @param currentCurrency - The currency code for the user's chosen fiat currency
230
+
* @param [tokenAmount] - The current token balance
231
+
* @param [tokenSymbol] - The token symbol
232
+
* @param [formatted] - Whether the return value should be formatted or not
233
+
* @param [hideCurrencySymbol] - excludes the currency symbol in the result if true
234
+
* @returns The token amount in the user's chosen fiat currency, optionally formatted and localize, or undefined
0 commit comments