This repository has been archived by the owner on Jun 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
List Madbyte (MBYT) #47
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* This file is part of Bisq. | ||
* | ||
* Bisq is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at | ||
* your option) any later version. | ||
* | ||
* Bisq is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package bisq.asset.coins; | ||
|
||
import bisq.asset.Coin; | ||
import bisq.asset.RegexAddressValidator; | ||
|
||
public class Madbyte extends Coin { | ||
|
||
public Madbyte() { | ||
super("Madbyte", "MBYT", new RegexAddressValidator("^[M][a-zA-Z0-9]{33}$")); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -306,6 +306,8 @@ private void printAllCurrencyStats() { | |
newlyAdded.add("GEO"); | ||
newlyAdded.add("GRANS"); | ||
newlyAdded.add("ICH"); | ||
newlyAdded.add("MBYT"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not touch this file. |
||
|
||
|
||
coinsWithValidator.addAll(newlyAdded); | ||
|
||
|
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 |
---|---|---|
|
@@ -988,6 +988,21 @@ public void testPHR() { | |
assertFalse(validator.validate("").isValid); | ||
} | ||
|
||
@Test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cbeams do we want anybody to touch this file anymore? |
||
public void testMBYT() { | ||
validator.setCurrencyCode("MBYT"); | ||
|
||
assertTrue(validator.validate("MEvQJ25RDsENWhPHkApDZPXjrFxKUR9mGR").isValid); | ||
assertTrue(validator.validate("MMqP3zkuZvHiupEe5DHXjr2NNwhc9EhB2J").isValid); | ||
assertTrue(validator.validate("MBegzGWVKWxFk8Eq5NP6veEQAaEnfj3udf").isValid); | ||
|
||
assertFalse(validator.validate("mEvQJ25RDsENWhPHkApDZPXjrFxKUR9mGR").isValid); | ||
assertFalse(validator.validate("MMqP3zkuZvHiupEe5DHXjr2NNwhc9EhB2Js").isValid); | ||
assertFalse(validator.validate("MMqP3zkuZvHiupEe5DHXjr2NNwhc9EhB2").isValid); | ||
assertFalse(validator.validate("MBegzGWVKWxFk8Eq5NP6veEQAaEnfj3ud#").isValid); | ||
assertFalse(validator.validate("").isValid); | ||
} | ||
|
||
private void testDefaultValidator(String currencyCode) { | ||
validator.setCurrencyCode(currencyCode); | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not touch this file.