mirror of
https://github.com/luxfi/lux-security-engine.git
synced 2026-10-30 16:20:37 +00:00
24 lines
661 B
JavaScript
24 lines
661 B
JavaScript
const rules = [
|
|
{
|
|
id: "1088",
|
|
enable: true,
|
|
valueDescription: "Does the signature belong to the website that initiated it",
|
|
valueDefine: {
|
|
type: "boolean",
|
|
},
|
|
defaultThreshold: {
|
|
danger: false,
|
|
},
|
|
customThreshold: {},
|
|
requires: ["verifyAddress"],
|
|
async getValue(ctx) {
|
|
const { allowOrigins, origin } = ctx.verifyAddress;
|
|
return allowOrigins.includes(origin);
|
|
},
|
|
descriptions: {
|
|
danger: `The transaction is not associated with the website that initiated it`,
|
|
},
|
|
},
|
|
];
|
|
export default rules;
|