1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 13:19:39 +02:00

Fix EU plaid flow (#1761)

* Fix EU plaid flow

* Fix failing tests
This commit is contained in:
Zach Gollwitzer 2025-01-31 17:04:26 -05:00 committed by GitHub
parent 4bf72506d5
commit 53f4b32c33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 91 additions and 86 deletions

View file

@ -4,7 +4,7 @@ import { Controller } from "@hotwired/stimulus";
export default class extends Controller {
static values = {
linkToken: String,
region: { type: String, default: "us" }
region: { type: String, default: "us" },
};
open() {
@ -19,7 +19,7 @@ export default class extends Controller {
handler.open();
}
handleSuccess(public_token, metadata) {
handleSuccess = (public_token, metadata) => {
window.location.href = "/accounts";
fetch("/plaid_items", {
@ -32,7 +32,7 @@ export default class extends Controller {
plaid_item: {
public_token: public_token,
metadata: metadata,
region: this.regionValue
region: this.regionValue,
},
}),
}).then((response) => {
@ -40,17 +40,17 @@ export default class extends Controller {
window.location.href = response.url;
}
});
}
};
handleExit(err, metadata) {
handleExit = (err, metadata) => {
// no-op
}
};
handleEvent(eventName, metadata) {
handleEvent = (eventName, metadata) => {
// no-op
}
};
handleLoad() {
handleLoad = () => {
// no-op
}
};
}