Skip to content

Commit

Permalink
fix: stacks default network
Browse files Browse the repository at this point in the history
  • Loading branch information
Wozacosta committed Feb 13, 2025
1 parent d2130f1 commit 7bd3b7c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const estimateMaxSpendable: AccountBridge<Transaction>["estimateMaxSpenda
};
// Compute fees
const { recipient, anchorMode, memo, amount } = dummyTx;
const network = StacksNetwork[dummyTx.network] || new StacksMainnet();
const network = StacksNetwork[dummyTx.network] || new StacksMainnet({url: 'https://stacks.coin.ledger.com/'});

const options: UnsignedTokenTransferOptions = {
recipient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const prepareTransaction: AccountBridge<Transaction>["prepareTransaction"
if (xpub && recipient && validateAddress(recipient).isValid) {
const { anchorMode, memo, amount } = transaction;

const network = StacksNetwork[transaction.network] || new StacksMainnet();
const network = StacksNetwork[transaction.network] || new StacksMainnet({url: 'https://stacks.coin.ledger.com/'});

// Check if recipient is valid
const options: UnsignedTokenTransferOptions = {
Expand Down
2 changes: 1 addition & 1 deletion libs/coin-modules/coin-stacks/src/network/api.types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StacksMainnet, StacksTestnet } from "@stacks/network";

export const StacksNetwork = {
mainnet: new StacksMainnet(),
mainnet: new StacksMainnet({url: 'https://stacks.coin.ledger.com/'}),
testnet: new StacksTestnet(),
};

Expand Down

0 comments on commit 7bd3b7c

Please sign in to comment.