I see a set of three superfluous raw.pop(); statements which appear to be removing information from the raw (encoded but not signed) staking transaction here.
I believe these statements are callous because they are meant to be removing the pushes which only occur when chainId is not null, that is, when this condition: (this.chainId != null && this.chainId !== 0) is true.
To provide an example, if chainId were null, the pop statements would drop the last three elements of the array, that is, gasLimit, gasPrice and nonce. Is this intentional ?
In simple transactions (non-staking), this is taken care of by checking the array length but I do not see a similar check here.
I see a set of three superfluous
raw.pop();
statements which appear to be removing information from the raw (encoded but not signed) staking transaction here.I believe these statements are callous because they are meant to be removing the
push
es which only occur whenchainId
is notnull
, that is, when this condition:(this.chainId != null && this.chainId !== 0)
is true.To provide an example, if
chainId
werenull
, thepop
statements would drop the last three elements of the array, that is,gasLimit
,gasPrice
andnonce
. Is this intentional ?In simple transactions (non-staking), this is taken care of by checking the array length but I do not see a similar check here.