@remit/web-client 0.0.140 → 0.0.141
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.
|
|
3
|
+
"version": "0.0.141",
|
|
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": {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { RemitImapAddressResponse } from "@remit/api-http-client/types.gen.ts";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* `GET /addresses/search`
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* `GET /addresses/search` matches the query as a substring of a display name, a
|
|
5
|
+
* local part, a domain or a whole address, and answers in relevance order. A
|
|
6
|
+
* query for one sender's address therefore returns several rows: everyone
|
|
7
|
+
* sharing that domain matches it too.
|
|
8
8
|
*
|
|
9
9
|
* Asking for a single row and taking `items[0]` is therefore wrong twice over:
|
|
10
10
|
* the row it returns may belong to a different sender, and the row we actually
|
|
@@ -22,10 +22,9 @@ export const senderAddressSearchQuery = (
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Select the address row for exactly this sender.
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* resolving.
|
|
25
|
+
* Select the address row for exactly this sender. Another sender under the same
|
|
26
|
+
* domain is not this sender, so it resolves to `undefined` rather than the wrong
|
|
27
|
+
* address — silently flagging the wrong sender is worse than not resolving.
|
|
29
28
|
*/
|
|
30
29
|
export const pickSenderAddress = (
|
|
31
30
|
items: RemitImapAddressResponse[] | undefined,
|