Accept only empty nonce for memo validation script to work as a blocking script
This commit is contained in:
parent
e04ddb94ca
commit
74089e9f5c
|
@ -156,13 +156,11 @@ async function loop() {
|
|||
|
||||
for (let i = transactions.length - 1; i >= 0; i -= 1) {
|
||||
const tx = transactions[i]
|
||||
if (tx.memo !== 'funding') {
|
||||
if (tx.memo === '') {
|
||||
const publicKeyEncoded = (await getTx(tx.txHash)).signatures[0].pub_key.value
|
||||
await proxyHttpClient.post('/transfer', {
|
||||
to: computeAddress(Buffer.from(publicKeyEncoded, 'base64')),
|
||||
value: new BN(tx.value)
|
||||
.multipliedBy(10 ** 18)
|
||||
.integerValue(),
|
||||
value: new BN(tx.value).multipliedBy(10 ** 18).integerValue(),
|
||||
hash: `0x${tx.txHash}`
|
||||
})
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ async function main() {
|
|||
receipt = await client.multiSend(from, outputs, 'funding')
|
||||
} else {
|
||||
console.log(`From ${from} to ${to}, ${tokens} ${FOREIGN_ASSET}'`)
|
||||
receipt = await client.transfer(from, to, tokens, FOREIGN_ASSET, 'exchange')
|
||||
receipt = await client.transfer(from, to, tokens, FOREIGN_ASSET, '')
|
||||
}
|
||||
|
||||
if (receipt.status === 200) {
|
||||
|
|
Loading…
Reference in New Issue