-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: new sbtc network #5982
test: new sbtc network #5982
Conversation
0f4af50
to
f692075
Compare
73926a4
to
14fa78a
Compare
Anything specific I can help test here? |
Still running into Leather validation issue for This is the code that i'm running const sendParams = {
recipients: [
{
address: p2trAddress,
amount: `${amount}`,
},
],
network: process.env.NEXT_PUBLIC_WALLET_NETWORK || "sbtcTestnet",
}; process.env.NEXT_PUBLIC_WALLET_NETWORK is p2trAddress = bcrt1pzxz00vdnc8j4rz6u9axp6jmh60f8v7t8zkmwzm4x3899fvvl78nseyz7r2 response "Validation error: Address is for incorrect network at "recipients"" |
@setbern this is a different validation error, fixing now |
@kyranjamie If i comment out the following it works (probably involves what you pointed out) export const rpcSendTransferParamsSchema = z
.object({
account: accountSchema.optional(),
// works if i comment out the line below
//network: defaultNetworksSchema.optional(),
recipients: z
.array(
z.object({
address: z.string(),
amount: z.string().refine(value => checkIfDigitsOnly(value), {
message: 'Sat denominated amounts only',
}),
})
)
.nonempty()
.refine(
recipients => {
const inferredNetworksByAddress = recipients.map(({ address }) =>
getNetworkTypeFromAddress(address)
);
return uniqueArray(inferredNetworksByAddress).length === 1;
},
{ message: 'Cannot tranfer to addresses of different networks', path: ['recipients'] }
),
})
.refine(
({ network, recipients }) => {
const addressNetworks = recipients.map(recipient =>
btcAddressNetworkValidator(network as BitcoinNetworkModes).isValidSync(recipient.address)
);
return !addressNetworks.some(val => val === false);
},
{ message: FormErrorMessages.IncorrectNetworkAddress, path: ['recipients'] }
); |
@setbern fixed it, there was an illegal type cast here btcAddressNetworkValidator(network as BitcoinNetworkModes) // was not BitcoinNetworkModes |
Tested this as well and confirming it works on my side too, thank you! |
be261f1
to
22aa41b
Compare
This PR generates a build with the sBTC Testnet network, pointing to Stacks testnet and generating regtests addresses for https://beta.sbtc-mempool.tech/api/proxy
This needs to be modified in monorepo, but here for testing purposes