mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
validation handling
This commit is contained in:
@@ -315,7 +315,7 @@ export class StratumV1Client {
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.error('Mining Submit validation error');
|
console.log('Mining Submit validation error');
|
||||||
const err = new StratumErrorMessage(
|
const err = new StratumErrorMessage(
|
||||||
miningSubmitMessage.id,
|
miningSubmitMessage.id,
|
||||||
eStratumErrorCode.OtherUnknown,
|
eStratumErrorCode.OtherUnknown,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export class SubscriptionMessage extends StratumBaseMessage {
|
|||||||
@IsString()
|
@IsString()
|
||||||
@MaxLength(128)
|
@MaxLength(128)
|
||||||
@Transform(({ value, key, obj, type }) => {
|
@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;
|
public userAgent: string;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user