Skip to content

Commit 41b5aaa

Browse files
committed
chore: improve address checking note
1 parent 5640f9e commit 41b5aaa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

withdrawals-highload-batch.js

+3
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ const init = async () => {
257257
batch.createdAt = now;
258258

259259
for (const request of batch.requests) {
260+
// convert the address to bounceable or non-bounceable form as needed
261+
// note: you can also do that in the service that creates withdrawal requests instead of here
262+
// if you do this in the other service, it should improve the performance of this withdrawal service
260263
const addrInfo = await tonweb.provider.getAddressInfo(request.toAddress);
261264
const addr = new TonWeb.Address(request.toAddress).toString(true, true, addrInfo.state === 'active');
262265
if (addr !== request.toAddress) {

withdrawals-highload.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ const init = async () => {
117117
withdrawalRequest.createdAt = now;
118118

119119
// convert the address to bounceable or non-bounceable form as needed
120-
// you can also do that in the service that creates withdrawal requests instead of here
120+
// note: you can also do that in the service that creates withdrawal requests instead of here
121+
// if you do this in the other service, it should improve the performance of this withdrawal service
121122
const addrInfo = await tonweb.provider.getAddressInfo(withdrawalRequest.toAddress);
122123
const addr = new TonWeb.Address(withdrawalRequest.toAddress).toString(true, true, addrInfo.state === 'active');
123124
if (addr !== withdrawalRequest.toAddress) {

0 commit comments

Comments
 (0)