This repository has been archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
review-fix: Refactor to use util functions isEtcChainId, chainIdToStr…
…ing, isNotErc20TokenAddress
- Loading branch information
Luke Schoen
committed
Apr 8, 2019
1 parent
3452680
commit b31e433
Showing
6 changed files
with
63 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2015-2019 Parity Technologies (UK) Ltd. | ||
// This file is part of Parity. | ||
// | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
const isEtcChainId = currentChainIdBN => { | ||
return currentChainIdBN.valueOf() === '61'; | ||
}; | ||
|
||
const chainIdToString = currentChainIdBN => { | ||
return isEtcChainId(currentChainIdBN) ? 'ETC' : 'ETH'; | ||
}; | ||
|
||
const isNotErc20TokenAddress = tokenAddress => { | ||
return tokenAddress === 'ETH' || tokenAddress === 'ETC'; | ||
}; | ||
|
||
export { chainIdToString, isNotErc20TokenAddress, isEtcChainId }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters