fix send tx

This commit is contained in:
Anh Minh 2025-10-07 22:24:54 +07:00
parent d5e89c757d
commit f9a0c861fb
3 changed files with 12 additions and 4 deletions

View File

@ -126,6 +126,7 @@ func (nc *NockchainClient) WalletSendTransaction(tx *nockchain.RawTx) (*nockchai
req := nockchain.WalletSendTransactionRequest{
TxId: ParseHash(tx.TxId),
RawTx: &nockchain.RawTransaction{
Id: ParseHash(tx.TxId),
NamedInputs: inputs,
TotalFees: &nockchain.Nicks{Value: tx.TotalFees},
TimelockRange: &nockchain.TimeLockRangeAbsolute{

View File

@ -455,7 +455,10 @@ func (h *GprcHandler) CreateTx(ctx context.Context, req *nockchain.CreateTxReque
var timelockRange *nockchain.TimelockRange
if req.TimelockIntent == nil {
timelockRange = nil
timelockRange = &nockchain.TimelockRange{
Min: nil,
Max: nil,
}
} else {
if req.TimelockIntent.Absolute != nil {
timelockRange = req.TimelockIntent.Absolute

View File

@ -120,13 +120,17 @@ func ConvertInput(input *nockchain.NockchainInput) (*nockchain.NamedInput, error
}
pks = append(seedPks, pk)
}
seeds = append(seeds, &nockchain.Seed{
OutputSource: &nockchain.OutputSource{
var source *nockchain.OutputSource
if seed.OutputSource != nil {
source = &nockchain.OutputSource{
Source: &nockchain.Source{
Hash: ParseHash(seed.OutputSource.Source),
Coinbase: input.Note.Source.IsCoinbase,
},
},
}
}
seeds = append(seeds, &nockchain.Seed{
OutputSource: source,
Recipient: &nockchain.Lock{
KeysRequired: uint32(seed.Recipient.KeysRequired),
SchnorrPubkeys: seedPks,