From f599918a135bd96f8e772cda1e7aebc7905675df Mon Sep 17 00:00:00 2001 From: jmather-c <117302272+jmather-c@users.noreply.github.com> Date: Fri, 24 Mar 2023 14:00:23 -0700 Subject: [PATCH] #1028: calculate proper iframe url (#1054) * WIP for iframe calc, stuck on AWS keys * More tweaks * Revert changes to systemconnectionstep --- Gemfile | 1 + Gemfile.lock | 2 ++ app/controllers/controller_helpers.rb | 2 +- .../default/lwc/systemConnectionsStep/systemConnectionsStep.js | 3 ++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 3b5674a8bf..125bccffa0 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,7 @@ gem 'activesupport', '~> 6.1.7' gem 'reline', '~> 0.3.1' gem 'dotenv-rails', '2.8.1', groups: [:development, :test] +gem 'foreman', groups: [:development, :test] gem 'rails', '~> 6.1.7.2' gem 'lograge', '~> 0.12' diff --git a/Gemfile.lock b/Gemfile.lock index 28b492f2e3..61904996b8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -137,6 +137,7 @@ GEM multipart-post (~> 2) faraday-net_http (2.1.0) ffi (1.15.5) + foreman (0.87.2) fugit (1.8.1) et-orbi (~> 1, >= 1.2.7) raabro (~> 1.4) @@ -453,6 +454,7 @@ DEPENDENCIES capybara-screenshot (~> 1.0.26) database_cleaner (~> 1.7.0) dotenv-rails (= 2.8.1) + foreman hash_diff (~> 1.1.1) listen lograge (~> 0.12) diff --git a/app/controllers/controller_helpers.rb b/app/controllers/controller_helpers.rb index 47213e2048..f586b6ef61 100644 --- a/app/controllers/controller_helpers.rb +++ b/app/controllers/controller_helpers.rb @@ -32,7 +32,7 @@ module ControllerHelpers sig { params(user: StripeForce::User).returns(String) } protected def iframe_domain_from_user(user) if user.scratch_org? - "vf.force.com" + "scratch.vf.force.com" else "visualforce.com" end diff --git a/sfdx/force-app/main/default/lwc/systemConnectionsStep/systemConnectionsStep.js b/sfdx/force-app/main/default/lwc/systemConnectionsStep/systemConnectionsStep.js index 142ef6ead9..fe2d1902f1 100644 --- a/sfdx/force-app/main/default/lwc/systemConnectionsStep/systemConnectionsStep.js +++ b/sfdx/force-app/main/default/lwc/systemConnectionsStep/systemConnectionsStep.js @@ -7,7 +7,7 @@ export default class SystemConnectionsStep extends LightningElement { @track stripeComplete = false; @track connectWindow; @track isSandbox; - // TODO should be pulled from APEX + // TODO should be pulled from APEX, use http://localhost:3100 for localdev @track rubyBaseURI = 'https://salesforce.suitesync.io'; @track salesforceNamespace; @api hideAction = false; @@ -19,6 +19,7 @@ export default class SystemConnectionsStep extends LightningElement { stripeConnectedAppCallback() { this.validateConnectionStatus(true, ''); this.postMessageListener = (event) => { +// console.log('Got event: ' + JSON.parse(JSON.stringify(event))); if(event.origin !== this.rubyBaseURI) { console.log("bad post message origin") return