mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-04-12 13:59:25 +02:00
validation handling
This commit is contained in:
parent
02d718934d
commit
ff6d446c12
@ -316,7 +316,7 @@ export class StratumV1Client {
|
||||
|
||||
|
||||
} else {
|
||||
console.error('Mining Submit validation error');
|
||||
console.log('Mining Submit validation error');
|
||||
const err = new StratumErrorMessage(
|
||||
miningSubmitMessage.id,
|
||||
eStratumErrorCode.OtherUnknown,
|
||||
|
@ -14,7 +14,7 @@ export class SubscriptionMessage extends StratumBaseMessage {
|
||||
@IsString()
|
||||
@MaxLength(128)
|
||||
@Transform(({ value, key, obj, type }) => {
|
||||
return obj.params[0] == null ? 'unknown' : SubscriptionMessage.refineUserAgent(obj.params[0]);
|
||||
return obj?.params?.[0] == null ? 'unknown' : SubscriptionMessage.refineUserAgent(obj.params[0]);
|
||||
})
|
||||
public userAgent: string;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user