Skip to content

Commit

Permalink
#1028: calculate proper iframe url (#1054)
Browse files Browse the repository at this point in the history
* WIP for iframe calc, stuck on AWS keys

* More tweaks

* Revert changes to systemconnectionstep
  • Loading branch information
jmather-c authored Mar 24, 2023
1 parent bf2f4f0 commit f599918
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/controller_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit f599918

Please sign in to comment.