-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Tether token support via ERC20 and Omni
- Loading branch information
Showing
8 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
assets/src/main/java/bisq/asset/LiquidBitcoinAddressValidator.java
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,12 @@ | ||
package bisq.asset; | ||
|
||
public class LiquidBitcoinAddressValidator extends RegexAddressValidator { | ||
static private final String REGEX = "^([a-km-zA-HJ-NP-Z1-9]{26,35}|[a-km-zA-HJ-NP-Z1-9]{80}|[a-z]{2,5}1[ac-hj-np-z02-9]{8,87}|[A-Z]{2,5}1[AC-HJ-NP-Z02-9]{8,87})$"; | ||
public LiquidBitcoinAddressValidator() { | ||
super(REGEX); | ||
} | ||
|
||
public LiquidBitcoinAddressValidator(String regex, String errorMessageI18nKey) { | ||
super(REGEX, "validation.altcoin.liquidBitcoin.invalidAddress"); | ||
} | ||
} |
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
12 changes: 12 additions & 0 deletions
12
assets/src/main/java/bisq/asset/coins/TetherUSDLiquid.java
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,12 @@ | ||
package bisq.asset.coins; | ||
|
||
import bisq.asset.Coin; | ||
import bisq.asset.LiquidBitcoinAddressValidator; | ||
|
||
public class TetherUSDLiquid extends Coin { | ||
public TetherUSDLiquid() { | ||
// If you add a new USDT variant or want to change this ticker symbol you should also look here: | ||
// core/src/main/java/bisq/core/provider/price/PriceProvider.java:getAll() | ||
super("Tether USD (Liquid Bitcoin)", "L-USDT", new LiquidBitcoinAddressValidator()); | ||
} | ||
} |
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,12 @@ | ||
package bisq.asset.coins; | ||
|
||
import bisq.asset.Base58BitcoinAddressValidator; | ||
import bisq.asset.Coin; | ||
|
||
public class TetherUSDOmni extends Coin { | ||
public TetherUSDOmni() { | ||
// If you add a new USDT variant or want to change this ticker symbol you should also look here: | ||
// core/src/main/java/bisq/core/provider/price/PriceProvider.java:getAll() | ||
super("Tether USD (Omni)", "USDT-O", new Base58BitcoinAddressValidator()); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
assets/src/main/java/bisq/asset/tokens/TetherUSDERC20.java
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,11 @@ | ||
package bisq.asset.tokens; | ||
|
||
import bisq.asset.Erc20Token; | ||
|
||
public class TetherUSDERC20 extends Erc20Token { | ||
public TetherUSDERC20() { | ||
// If you add a new USDT variant or want to change this ticker symbol you should also look here: | ||
// core/src/main/java/bisq/core/provider/price/PriceProvider.java:getAll() | ||
super("Tether USD (ERC20)", "USDT-E"); | ||
} | ||
} |
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