(key)
| 220 | } |
| 221 | |
| 222 | function ExternalAccount(key) { |
| 223 | try { |
| 224 | const k = JSON.parse(letterDecode(key)); |
| 225 | $.log(`Raw data: ${key}\nDecode data: ${$.stringify(k)}`); |
| 226 | if (!k.appID || !k.accID || !k.key[k1] || !k.key[k2] || !k.key[k3]) { |
| 227 | throw new Error('Missing data'); |
| 228 | } else if (appList[k.appID]) { |
| 229 | $.notify('TestFlight Account', '', `Failed, app already exists ⚠️`); |
| 230 | } else { |
| 231 | const save = SaveAccount(k.accID, k.key, k.appID); |
| 232 | } |
| 233 | } catch (e) { |
| 234 | const text = `External account parse failed`; |
| 235 | $.notify('TestFlight Account', '', `${text} ⚠️`); |
| 236 | $.error(`${text}: ${e.message || e}`); |
| 237 | } |
| 238 | return '{}' |
| 239 | } |
| 240 | |
| 241 | function ShareAccount(appID) { |
| 242 | const raw = $.stringify({ |
no test coverage detected