File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/loopring_v3/contracts/impl/libexchange Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -463,11 +463,15 @@ library ExchangeWithdrawals
463
463
internal
464
464
returns (bool success )
465
465
{
466
- address to = S.accounts[accountID].owner;
467
466
// If we're withdrawing from the protocol fee account send the tokens
468
- // directly to the protocol fee manager
469
- if (accountID == 0 ) {
467
+ // directly to the protocol fee vault.
468
+ // If we're withdrawing to an unknown account (can currently happen while
469
+ // distributing tokens in shutdown) send the tokens to the protocol fee vault as well.
470
+ address to;
471
+ if (accountID == 0 || accountID >= S.accounts.length ) {
470
472
to = S.loopring.protocolFeeVault ();
473
+ } else {
474
+ to = S.accounts[accountID].owner;
471
475
}
472
476
473
477
address token = S.getTokenAddress (tokenID);
You can’t perform that action at this time.
0 commit comments