File tree Expand file tree Collapse file tree 1 file changed +12
-16
lines changed
logic/lib/src/domain/repositories/wallet Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -249,22 +249,18 @@ class TokenContractRepository {
249249 return tokens;
250250 }
251251
252- Future <Token ?> getToken (String address) async {
253- try {
254- final data = EthereumAddress .fromHex (address);
255- final ensToken = contracts.EnsToken (client: _web3Client, address: data);
256- final symbol = await ensToken.symbol ();
257- final decimals = await ensToken.decimals ();
258-
259- return Token (
260- address: address,
261- name: symbol,
262- symbol: symbol,
263- decimals: decimals.toInt (),
264- );
265- } catch (e) {
266- throw Exception (e.toString ());
267- }
252+ Future <Token > getToken (String address) async {
253+ final data = EthereumAddress .fromHex (address);
254+ final ensToken = contracts.EnsToken (client: _web3Client, address: data);
255+ final symbol = await ensToken.symbol ();
256+ final decimals = await ensToken.decimals ();
257+
258+ return Token (
259+ address: address,
260+ name: symbol,
261+ symbol: symbol,
262+ decimals: decimals.toInt (),
263+ );
268264 }
269265
270266 // Return null if the address does not have a ENS name
You can’t perform that action at this time.
0 commit comments