Skip to content

Commit

Permalink
fix test stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
justinvforvendetta committed Jul 23, 2024
1 parent f2152d2 commit 6dd4865
Show file tree
Hide file tree
Showing 30 changed files with 10,309 additions and 582 deletions.
28 changes: 28 additions & 0 deletions core/src/main/java/com/vergepay/core/coins/NxtMain.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.vergepay.core.coins;

import com.vergepay.core.coins.families.NxtFamily;

/**
* @author John L. Jegutanis
*/
public class NxtMain extends NxtFamily {

private NxtMain() {
id = "nxt.main";

name = "NXT";
symbol = "NXT";
uriScheme = "nxt";
bip44Index = 29;
unitExponent = 8;
addressPrefix = "NXT-";
feeValue = oneCoin();
minNonDust = value(1);
feePolicy = FeePolicy.FLAT_FEE;
}

private static final NxtMain instance = new NxtMain();
public static synchronized CoinType get() {
return instance;
}
}
40 changes: 40 additions & 0 deletions core/src/main/java/com/vergepay/core/coins/families/NxtFamily.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package com.vergepay.core.coins.families;

import com.vergepay.core.coins.CoinType;
import com.vergepay.core.exceptions.AddressMalformedException;
import com.vergepay.core.messages.MessageFactory;
import com.vergepay.core.wallet.AbstractAddress;
import com.vergepay.core.wallet.families.nxt.NxtAddress;
import com.vergepay.core.wallet.families.nxt.NxtTxMessage;

import javax.annotation.Nullable;


/**
* @author John L. Jegutanis
*
* Coins that belong to this family are: NXT, Burst, etc
*/
public abstract class NxtFamily extends CoinType {
public static final short DEFAULT_DEADLINE = 1440;

{
family = Families.NXT;
}

@Override
public AbstractAddress newAddress(String addressStr) throws AddressMalformedException {
return NxtAddress.fromString(this, addressStr);
}

@Override
public boolean canHandleMessages() {
return true;
}

@Override
@Nullable
public MessageFactory getMessagesFactory() {
return NxtTxMessage.getFactory();
}
}
Loading

0 comments on commit 6dd4865

Please sign in to comment.