Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
react-native-sp-reader-sdk
Advanced tools
react-native
version >0.40
Check the wiki for instructions.
import ReaderSDK from 'react-native-sp-reader-sdk';
class testApp extends Component {
constructor() {
super();
const readerSdk = new ReaderSDK();
// initialize the sdk
readerSdk.initSdk();
// login with an auth code
readerSDK.authorizeWithCode("1234567").then(() => {
// success
}).catch((err) => {
// failure
})
// find out if already logged into readerSDK
const isLoggedIn = await readerSdk.isLoggedIn();
// set other settings
readerSDK.setCheckoutParameters(
ReaderSDK
.AdditionalPaymentTypes
.MANUAL_CARD_ENTRY, // additional payment types
null, // tip percentages arr
tipsEnabled, // tips enabled
false, // custom tip field visible
false, // separate tip screen visible
true, // skip receipt
false, // always require signature
false, // allow split tender
);
// present the settings screen
readerSDK.presentReaderSettingsScreen(
true, // animate modal window
);
// find out if logged in
const isLoggedIn = readerSDK.isLoggedIn()
.then(isLoggedIn => {
// isLoggedIn is either true or false
});
readerSDK.requestPermissions() // so try asking for permissions (needed for iOS)
.then((permissions) => {
if (permissions != null) {
let permissionsGranted;
if (notAndroid) {
const {
appLocationPermission,
deviceLocationEnabled,
appRecordingPermission,
} = permissions;
// do sth?
}
}
});
readerSDK.checkoutWithAmount(
100, // amount to pay (in cents)
'This is a transaction', // transaction notes
).then((result) => { // transactionRequestWithCentsAmount success
/*
{
"transaction": {
createdAt:"2018-07-25T18:13:02+03:00"
locationID:"18K28ZA1PZF1T"
tenderCnt:1
totalMoneyAmount:115 (in cents, aka 1,15$)
totalMoneyCurrency:"USD"
totalTipMoneyAmount:15 (in cents, aka 0,15$)
totalTipMoneyCurrency:"USD"
transactionClientID:"EE8E7FF7-D16E-4350-91AD-47F2S6C7B447"
transactionID:"Wo5JKw2fOp7dfwai7Gv3FlO14D9eV"
}
}
*/
// Do something with the result
})
.catch((e) => { // checkoutWithAmount error
});
readerSDK.deauthorize(); // logout
}
...
}
FAQs
Unknown package
The npm package react-native-sp-reader-sdk receives a total of 1 weekly downloads. As such, react-native-sp-reader-sdk popularity was classified as not popular.
We found that react-native-sp-reader-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.