Skip to content

Commit

Permalink
chains added
Browse files Browse the repository at this point in the history
  • Loading branch information
n13 committed Jun 12, 2024
1 parent 4db8ab8 commit 87820cb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
26 changes: 26 additions & 0 deletions lib/datasource/remote/api/http_repo/seeds_chain_names.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const String _chainTelos = 'telos';
const String _chainTelosTest = 'telosTestnet';
const String _chainEos = 'eos';
const String _chainEosTest = 'eosTestnet';

enum SeedsChains {
telos,
telosTestnet,
eos,
eosTestnet,
}

extension SeedsChainsExtension on SeedsChains {
String get value {
switch (this) {
case SeedsChains.telos:
return _chainTelos;
case SeedsChains.telosTestnet:
return _chainTelosTest;
case SeedsChains.eos:
return _chainEos;
case SeedsChains.eosTestnet:
return _chainEosTest;
}
}
}
3 changes: 2 additions & 1 deletion lib/datasource/remote/model/token_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:collection/collection.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
import 'package:json_schema2/json_schema2.dart';
import 'package:seeds/datasource/remote/api/http_repo/seeds_chain_names.dart';
import 'package:seeds/datasource/remote/api/tokenmodels_repository.dart';
import 'package:seeds/datasource/remote/firebase/firebase_remote_config.dart';
import 'package:seeds/domain-shared/shared_use_cases/get_token_models_use_case.dart';
Expand Down Expand Up @@ -149,7 +150,7 @@ class TokenModel extends Equatable {
}

const seedsToken = TokenModel(
chainName: "Telos",
chainName: SeedsChains.telos.value,
contract: "token.seeds",
symbol: "SEEDS",
name: "Seeds",
Expand Down

0 comments on commit 87820cb

Please sign in to comment.