Giter VIP home page Giter VIP logo

Comments (7)

tyvdh avatar tyvdh commented on June 3, 2024
{
  "message": "Unhandled error occurred. If this error persists, please contact Albedo support.",
  "code": -1
}

from albedo.

orbitlens avatar orbitlens commented on June 3, 2024

We tested on both Mac and iOS with default values from the playground and everything seems to work well. Could you please try to sign a tx in the implicit mode using the playground UI and let me know if you spot any other problems.

Also, please check the network when you are calling the intent. Session granted for the "testnet" won't be valid for "public" network.

from albedo.

tyvdh avatar tyvdh commented on June 3, 2024

Works fine in the playground. Definitely using the correct network, again works fine on Chrome.

Here's the xdr I'm trying to sign.

AAAAAgAAAABxVBxhMby8zkB3+nXlT1B3bZZVVPACgoyltPaeduz5zAAAASwADeyAAAAAAwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAABAAAAALPF/AGs1yfqdWWMZk1JKn4K7GXxgtLfw7sIi2atRTuzAAAAAQAAAABxVBxhMby8zkB3+nXlT1B3bZZVVPACgoyltPaeduz5zAAAAAAAAAAAlQL5AAAAAAAAAAAGAAAAAlNRMDAwMQAAAAAAAAAAAABlNnoKbiDR//fMdiS32OpAvBmrJ0C+ioHjsPxq/he1VwAAAAAAAAABAAAAAQAAAABlNnoKbiDR//fMdiS32OpAvBmrJ0C+ioHjsPxq/he1VwAAAAEAAAAAcVQcYTG8vM5Ad/p15U9Qd22WVVTwAoKMpbT2nnbs+cwAAAACU1EwMDAxAAAAAAAAAAAAAGU2egpuINH/98x2JLfY6kC8GasnQL6KgeOw/Gr+F7VXAAAAAAAAAAEAAAAAAAAAAv4XtVcAAABA/Xk0t7kKfmMNBPXoQrPy90jCC4TzaxVijNy+30vj3nF7ae7cqv7117eM3CZJUXTIje01ifGqCyFnXoJxB7AJAa1FO7MAAABAb9rVjTpTAFk2NmesLJhd6b0yKnzqdaZsFBRqJ5+fOXjZ3ewzcMSrYikertxUobDTyQ5g1DmJr8G2phPeXeinAg==

from albedo.

tyvdh avatar tyvdh commented on June 3, 2024

fwiw That XDR works and signs perfectly on the playground. Must be a cross origin popup thing?

from albedo.

tyvdh avatar tyvdh commented on June 3, 2024
async claimPrize(e, key) {
  e.preventDefault()

  if (!this.user.name)
    this.user.name = prompt(`In order to run a compliant competition we need your full name`)

  if (!this.user.name)
    return

  this.error = false
  this.loading = {[`claim-${key}`]: true}

  let albedoSessionPuk = loFirst(
    loMap(loMap(loFilter(loKeys(sessionStorage),
        (key) => loStartsWith(key, 'albedo_session_')
      ), (key) => JSON.parse(sessionStorage.getItem(key))
    ), ({pubkey}) => pubkey)
  )

  if (!albedoSessionPuk) albedoSessionPuk = await albedo.implicitFlow({
    intents: 'tx',
    network: 'testnet'
  }).then(({pubkey}) => pubkey)

  fetch(`${baseUrl}/prize/submit`, {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${this.session}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      key,
      name: this.user.name,
      puk: albedoSessionPuk,
    })
  })
  .then(handleResponse)
  .then(({xdr}) => {
    console.log(albedoSessionPuk)
    console.log(xdr)

    return albedo.tx({
      xdr,
      pubkey: albedoSessionPuk,
      network: 'testnet',
    })
  })
  .then(({signed_envelope_xdr}) =>
    fetch(`${baseUrl}/prize/submit`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${this.session}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        key,
        name: this.user.name,
        puk: albedoSessionPuk,
        innerTx: signed_envelope_xdr,
      })
    })
  )
  .then(handleResponse)
  .then(async () => {
    // TODO: Due to latency we need to save the claim status client side
    // await this.updateSession()

    this.success = {...this.success, [`claim-${key}`]: true}
  })
  .catch((err) => {
    this.error = err

    if (err.code === 1)
      sessionStorage.removeItem(`albedo_session_${albedoSessionPuk}`)
  })
  .finally(() => this.loading = {...this.loading, [`claim-${key}`]: false})
}

from albedo.

0001jb avatar 0001jb commented on June 3, 2024

Hi, I have a similar issue where I am using an iPhone to transfer XLM to a Bitstamp account and the transaction never gets validated. Is there anyone who could help me here? Thanks in advance.

from albedo.

orbitlens avatar orbitlens commented on June 3, 2024

@0001jb answered here.

from albedo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.