@remit/web-client 0.0.181 → 0.0.182

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/web-client",
3
- "version": "0.0.181",
3
+ "version": "0.0.182",
4
4
  "type": "module",
5
5
  "description": "Remit web client, published as composable primitives — the app shell, auth shells, and runtime config. A distributor imports what it composes and bundles it.",
6
6
  "exports": {
@@ -344,6 +344,26 @@ describe("buildAuthenticityIntel", () => {
344
344
  assert.match(result.summary, /only looks like/);
345
345
  });
346
346
 
347
+ test("a display name spelling a foreign address names the domain it cannot come from", () => {
348
+ const result = buildAuthenticityIntel(
349
+ makeThread({
350
+ fromEmail: "aramirez@secresaludguaviare.gov.co",
351
+ fromName: "matthijs@ischen.nl",
352
+ authenticity: {
353
+ fromDomain: "secresaludguaviare.gov.co",
354
+ dkimDomain: "secresaludguaviare.gov.co",
355
+ dkimMismatch: false,
356
+ displayNameCorrespondence: "ForeignAddress",
357
+ offDomainLinkDomains: [],
358
+ },
359
+ } as Partial<RemitImapThreadMessageResponse>),
360
+ 0,
361
+ );
362
+ assert.equal(result.verdict, "caution");
363
+ assert.match(result.summary, /"matthijs@ischen\.nl"/);
364
+ assert.match(result.summary, /secresaludguaviare\.gov\.co/);
365
+ });
366
+
347
367
  test("stays verified when the comparisons agreed", () => {
348
368
  const result = buildAuthenticityIntel(
349
369
  makeThread({
@@ -167,6 +167,10 @@ function describeSenderMismatch(
167
167
  clauses.push(
168
168
  `The name it shows, "${claimedBrand}", only looks like ${auth.fromDomain}.`,
169
169
  );
170
+ } else if (correspondence === DisplayNameCorrespondence.ForeignAddress) {
171
+ clauses.push(
172
+ `The name it shows, "${claimedBrand}", is an address ${auth.fromDomain} cannot send from.`,
173
+ );
170
174
  }
171
175
  }
172
176