mirror of
https://github.com/Brotocol-xyz/bro-sdk.git
synced 2026-01-12 22:25:00 +08:00
fix: minor fixes
This commit is contained in:
@@ -136,7 +136,7 @@ export async function bridgeFromBRC20(
|
||||
!equalBytes(
|
||||
info.fromAddressScriptPubKey,
|
||||
addressToScriptPubKey(
|
||||
info.fromChain === KnownChainId.Bitcoin.Mainnet
|
||||
info.fromChain === KnownChainId.BRC20.Mainnet
|
||||
? btc.NETWORK
|
||||
: btc.TEST_NETWORK,
|
||||
info.fromAddress,
|
||||
@@ -160,7 +160,7 @@ export async function bridgeFromBRC20(
|
||||
!equalBytes(
|
||||
info.toAddressScriptPubKey,
|
||||
addressToScriptPubKey(
|
||||
info.fromChain === KnownChainId.Bitcoin.Mainnet
|
||||
info.fromChain === KnownChainId.BRC20.Mainnet
|
||||
? btc.NETWORK
|
||||
: btc.TEST_NETWORK,
|
||||
info.toAddress,
|
||||
|
||||
@@ -147,7 +147,7 @@ export async function bridgeFromRunes(
|
||||
!equalBytes(
|
||||
info.fromAddressScriptPubKey,
|
||||
addressToScriptPubKey(
|
||||
info.fromChain === KnownChainId.Bitcoin.Mainnet
|
||||
info.fromChain === KnownChainId.Runes.Mainnet
|
||||
? btc.NETWORK
|
||||
: btc.TEST_NETWORK,
|
||||
info.fromAddress,
|
||||
@@ -171,7 +171,7 @@ export async function bridgeFromRunes(
|
||||
!equalBytes(
|
||||
info.toAddressScriptPubKey,
|
||||
addressToScriptPubKey(
|
||||
info.fromChain === KnownChainId.Bitcoin.Mainnet
|
||||
info.fromChain === KnownChainId.Runes.Mainnet
|
||||
? btc.NETWORK
|
||||
: btc.TEST_NETWORK,
|
||||
info.toAddress,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { isAddress } from "viem"
|
||||
import { SDK_NAME } from "../bitcoinUtils/constants"
|
||||
import { EVMEndpointContract } from "../evmUtils/evmContractAddresses"
|
||||
import { BigNumber } from "../utils/BigNumber"
|
||||
import { InvalidMethodParametersError } from "../utils/errors"
|
||||
@@ -6,7 +7,7 @@ import { InvalidMethodParametersError } from "../utils/errors"
|
||||
type SDKBrandedLiteral<
|
||||
Type extends string,
|
||||
T extends string | number,
|
||||
> = `${T} (BroSDK ${Type})`
|
||||
> = `${T} (${typeof SDK_NAME} ${Type})`
|
||||
|
||||
/**
|
||||
* Represents a unique identifier for a blockchain network.
|
||||
@@ -63,7 +64,7 @@ export const isEVMAddress = isAddress
|
||||
export type RuneIdCombined = `${number}:${number}`
|
||||
|
||||
export const evmNativeCurrencyAddress = Symbol(
|
||||
"[BroSDK] EVM Native Currency Address",
|
||||
`[${SDK_NAME}] EVM Native Currency Address`,
|
||||
)
|
||||
export type EVMNativeCurrencyAddress = typeof evmNativeCurrencyAddress
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { SDK_NAME } from "../bitcoinUtils/constants"
|
||||
import { ChainId, TokenId } from "../sdkUtils/types"
|
||||
import {
|
||||
SwapRouteViaALEX,
|
||||
@@ -8,7 +9,7 @@ import {
|
||||
export class BroSDKErrorBase extends Error {
|
||||
constructor(...args: ConstructorParameters<typeof Error>) {
|
||||
super(...args)
|
||||
this.name = "BroSDKErrorBase"
|
||||
this.name = `${SDK_NAME}ErrorBase`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user